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!