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!