From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Auto complete with multiple suggestions

Is it possible to show multiple suggestins (around 5 numbers ) in a combo box during autofill (like google search)

0 Kudos
Message 1 of 7
(4,558 Views)

Do you only have a set number of entries that will work successfully?  If so, you might be better off with the dropdown menu you'd create with the enum control.

 

Otherwise, you'll need to work with event structures to monitor when a key is pressed (value change won't take effect until you leave the control), read what's currently in the control, compare it against a dictionary, create the algorithm to determine what to suggest to fill it in, find a way to make the suggested part appear different, place the cursor where you want it, and put a mechanism in place to remove the old suggestion after each key press.

 

The time spent putting that together doesn't sound like something where it'd be worth the investment.

Message 2 of 7
(4,404 Views)

@karthik9 wrote:

Is it possible to show multiple suggestins (around 5 numbers ) in a combo box during autofill (like google search)


Yes, of course its possible. It would be a non-trivial efffort.  Google invested considerable man-hours developing and improving that search feature.  If someone asks you - "Heck, Google does it why can't you?" just quote the the correct time and materials estimate.  Yup Google invests a boat-load of money to do this "simple" thing.  Simple for the users that is... not so simple for the developers but the developers got paid a few years salary each to build that "Simple" feature.

 

And you want to duplicate that on any scale?  Good job security!  what would you like for take home pay for the next few years?


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 7
(4,306 Views)

You can't do this in a combo box (it doesn't show the list when you type), but you can do this by showing a listbox below the text. You can see an example here - http://forums.ni.com/ni/attachments/ni/130/9046/1/Intellisense.llb

 

Note that this example doesn't do autocomplete, but rather a search, so its algorithm may be different from what you need. You might also have some issue with when to show and hide the listbox, because you don't have focus gained and lost events (in that example, the listbox is just visible all the time because it's a popup).


___________________
Try to take over the world!
0 Kudos
Message 4 of 7
(4,288 Views)

This might be useful.  It is an example combo box that has auto complete (like QuickDrop) and adds a filter.  It isn't perfect but the idea is you type in some string and it will then populate a dropdown with options that contain what you typed.  So if you type "Br" all the names that contain "Br" will be in the drop down.

Message 5 of 7
(4,034 Views)

Could you please send the file in labview 2012 format

0 Kudos
Message 6 of 7
(3,999 Views)

Here you go.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 7
(3,959 Views)