Select all elements in App Designer List Box
3 views (last 30 days)
Show older comments
When i create an App with a List Box in GUIDE. I can select all the elements with crtl-A or ctrl and drag an drop.
If i do the same in App Designer. I does not work (Multiselect enabled) i have to select every single element with a mouseclick.
Any way to change this?
Thanks for your help!
0 Comments
Answers (1)
Laurence Pridmore
on 8 Nov 2019
I too wish to know this. I have a checkbox "Select all" that when checked should select all the items in the associated list box. The only code snippet I can find to do this is;
sizeOfListBox = numel(get(handles.SelectAllCheckBox, 'String'));
set(handles.SelectAllCheckBox, 'value',1:sizeOfListBox);
but this only works in GUIDE as far as I understand and I get an *Undefined variable "handles" error. Should "handles" be defined somehow and of so, where?
The rest of my code is working fine, I can multi select items in the listbox with CTRL and the output is as expected.
Another workaround to select all items is to select the first item in the list then SHIFT-click the last item, vis a vis typical Windows behaviour.
0 Comments
See Also
Categories
Find more on Develop Apps Using App Designer in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!