help me How to get the string from popup menu in matlab GUI ?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Nguyen Trong Nhan
am 23 Dez. 2013
Beantwortet: Image Analyst
am 23 Dez. 2013
Could you help me how to get the string in matlab GUI. I wrote : get(handles.popupmenu1,'string'). but it's error and can't get the string from popup menu. thanks you very much.
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 23 Dez. 2013
That should give you a list of all the items in the popup. I'm surprised it gives you an error. Even if it's empty I would think it would return null, []. What does the error message say exactly?
Normally you'd do something like
allItems = get(handles.popupmenu1,'string')
selectedIndex = get(handles.popupmenu1,'Value')
selectedItem = allItems{selectedIndex};
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!