Get string from popupmenu

3 ビュー (過去 30 日間)
Ahmed Alshehhi
Ahmed Alshehhi 2018 年 4 月 3 日
回答済み: Image Analyst 2018 年 4 月 3 日
I want to get string from popupmenu and use it as string in another function

採用された回答

Image Analyst
Image Analyst 2018 年 4 月 3 日
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.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeApp Building についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by