フィルターのクリア

how to manage pop up menu entries

1 回表示 (過去 30 日間)
Jihad Chamseddine
Jihad Chamseddine 2014 年 8 月 1 日
回答済み: Ben11 2014 年 8 月 1 日
hi, i am using a pop up menu and I want when i click on a push button, a layer or entrie will be added to the popup menu, also i want these entries to be numbered automatically, can that be done? thanks

回答 (1 件)

Ben11
Ben11 2014 年 8 月 1 日
In the pushbutton callback you can add this code to populate the popup menu through its 'String' property:
set(handles.YourPopupMenu,'String',[cellstr(get(handles.popupmenu_XYRegistration_Z,'String')') {'YourNewValue'}]);
So basically you get the current strings in the popup menu as a cell array of strings and then you concatenate vertically (using []), adding 'YourNewValue' at the end.

カテゴリ

Help Center および File ExchangeWorkspace Variables and MAT-Files についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by