Effacer les filtres
Effacer les filtres

Get string from popupmenu

6 vues (au cours des 30 derniers jours)
Ahmed Alshehhi
Ahmed Alshehhi le 3 Avr 2018
I want to get string from popupmenu and use it as string in another function

Réponse acceptée

Image Analyst
Image Analyst le 3 Avr 2018
Try this:
allItems = handles.popupname.String; % A cell array of all strings in the popup.
selectedIndex = handles.popupname.Value; % An integer saying which item has been selected.
selectedItem = allItems{selectedIndex}; % The one, single string which was selected.
YourOtherFunction(selectedItem); % Pass the string to some other function of yours.

Plus de réponses (0)

Catégories

En savoir plus sur App Building dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by