List Box in GUI
이전 댓글 표시
How to get the index of elements from the list box of not selected items from list box.
Usually list box gives elements index of selected items using property values
채택된 답변
추가 답변 (1개)
Titus Edelhofer
2012년 3월 30일
Hi,
you could do the following if I understood the question correclty:
allStrings = get(handles.listbox1, 'string');
selected = get(handles.listbox1, 'value');
% all indices:
allIndices = 1:length(allStrings);
% now subtract:
unselected = setdiff(allIndices, selected);
Titus Titus
카테고리
도움말 센터 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!