Select all elements in App Designer List Box
조회 수: 4 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Laurence Pridmore
2019년 11월 8일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!