How to select only two items from the list box?
Ältere Kommentare anzeigen
I want to select only two items from a list box. The list box should not accept more than two selected items.
Please provide an example for this.
Akzeptierte Antwort
Weitere Antworten (1)
Walter Roberson
am 20 Jan. 2011
1 Stimme
There is no (documented) MATLAB mechanism for restricting the number of multi-selected items in a listbox. Your callback function will need to detect the situation and decide what to do, such as setting the Value property to only reflect the first (or last) two of the chosen values, or popping up an error dialog.
Kategorien
Mehr zu App Building finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!