Multiple choices in a listbox
古いコメントを表示
I want to select multiple elements of a listbox and show them in another one. How can i do this in a simple way?
thanks
採用された回答
その他の回答 (1 件)
Walter Roberson
2011 年 5 月 31 日
0 投票
Set the 'Max' property of the listbox to be at least 2 greater than the 'Min' property. You will then be able to select multiple items in the usual ways (e.g., click-and-drag or control-click or as appropriate for your OS.) The listbox Value property will return an array of the indices of all the currently selected entries.
Note: the Callback will be called every time the selection changes, so if you are adding entries one by one using control or alt, then multiple callbacks will be generated.
3 件のコメント
Nuno Fernandes
2011 年 6 月 1 日
Matt Fig
2011 年 6 月 1 日
See the example I show above...
P
2012 年 9 月 5 日
Have you tried using the 'handles' structure to save the data in the callback of the first listbox and then displaying using a callback for the second listbox?
カテゴリ
ヘルプ センター および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!