Executing pop-up menu callback from an external function

11 ビュー (過去 30 日間)
Mariano Uberti
Mariano Uberti 2020 年 8 月 20 日
I have a pop-up menu "MyPopupMenu" in a figure "MyFigure" whose callback function I would like to call from an external function. Basically, the same that I would do by using the mouse to pick an item of the pop-up menu in the figure -thus execute the callback-, I would like to do it from and external function in a for loop. For Example:
% inside my function
for i=1:length(handles.MyPopupMenu)
set(handles.MypopupMenu, 'Value',i); % set index in popup menu % This works
%call popup callback on specific index - this doesnt work @(handles,eventdata)MyFigure('popupmenu_MyPopupMenu_Calllback',handles,eventdata,guidata(hObject));
end
Any help will be appreciate it.
Thanks,
Mariano
  1 件のコメント
Sahithi Kanumarlapudi
Sahithi Kanumarlapudi 2020 年 8 月 29 日
Could provide the entire code so that I can try to reproduce this issue on my end

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by