09-23-2008 12:27 PM
May be somebody already ask this question.
I would like have a user interface, with a suggesting name.
for example,
1. initially I have names such as: Andrew B, Andy C, Bill M, Bob T, Barbara K, Tony A. ... and so on in a text file.
2. on the front panel, I have a text string control for the users type in their name.
3 when the user type in B (which can be Bill M, Bob T or Babara K)
4. then the program brings up the three suggesting names, saving the user from typing the rest of the string.
5. I believe that I saw this a lot on internet, but I am not sure how the details work.
regards
09-23-2008 01:41 PM
The easiest is to use a combo box (from the string palette), which has a Strings[] property and does the filtering automatically.
You can also write use code to do more clever filtering, but I don't think you'll need that.
09-24-2008 07:49 AM
Thanks tst, for answering my question.
will the string control/input box, fill out the rest of the name?
ex: for my example, there is three names start with B; (Bill M, Bob T and Barbara C....)
user types in: B in the string control (or input) box.
the program : suggest by pop in three names Bill M, Bob T and Barbara C
user types in: i which is now Bi
the program: eliminates the other two choices (Bob T and Barbara C) and fill out the rest in the string or box as Bill M
Can you point me to an example VI to do this or a keyword search ?
09-24-2008 10:19 AM
The combo box does not actually display the list, only does the autocomplete.
If you want, the attached quick example which I wrote a long time ago does the display as well. If you want some more clever handling, you can also have a look at the VIs I posted here, which handle keyboard clicks as well and do a smarter search.
07-06-2012 04:02 PM
Bringing this back. When I change the combo box to hex display, and try and type in AA for example, it automatically changes it to 0A0A, when I actually need it to be AA55.What gives?
07-08-2012 02:29 AM
@Demetri90 wrote:
Bringing this back. When I change the combo box to hex display, and try and type in AA for example, it automatically changes it to 0A0A, when I actually need it to be AA55.What gives?
I don't normally use combo boxes, but I would say this looks like a bug with the combo box - when it's set to hex display it seems to sometimes treat the first character you type as if there was already a 0 typed before it. This doesn't happen all the time, but it does seem to happen more often than not. Also, it happens with the first char you type, even if there is already something in the combo box.
I posted a report here - http://forums.ni.com/t5/LabVIEW/Bug-report-Setting-a-combo-box-to-hex-adds-a-quot-0-quot-every/td-p/...
07-09-2012 02:45 PM
This problem is being looked into. See the linked report above for updates.
07-09-2012 03:53 PM
Odd that I stumbled upon this bug (Newbie). I guess the combobox isn't used that often?