Searching for text in listbox without deselecting current choice
Mostra commenti meno recenti
Hi all,
I have a list of 23,000 choices in a listbox in my GUI. I need to be able to select about 10 options at once. I have the multiselect setup, but because I have 23,000 entries, I can't manually scroll through to select the entries I want. The only way to search through the entries is to type, but when I type, it deselects whatever I had already selected.
Is there any way to implement a search bar above the listbox that will search through, but not select/deselect what appears in the listbox until I click the result?
That was just my idea, if there is a better solution feel free to share.
Thank you!
Risposta accettata
Più risposte (1)
Image Analyst
il 17 Giu 2015
You can get all the listbox items in a cell array like this:
allItems = get(handles.listbox1, 'String');
Now you can search all those items with ismember() or strfind(). It will not change what items are, or are not, selected.
1 Commento
Anthony
il 17 Giu 2015
Categorie
Scopri di più su Entering Commands in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!