how to call the callback in GUI ?
1 回表示 (過去 30 日間)
古いコメントを表示
I put this label into the figure that I created but how can I active it ? I want to load data , do you have any idea?
m = uimenu('Label','&File'); uimenu(m,'Label','Open','Callback','Mohammad');
2 件のコメント
Jan
2011 年 9 月 8 日
What exactly does "I want to load data" mean? What do you mean by "activate"? Usually a menu is activated by the mouse event. Do you want to call the callback function Mohammad manually?
採用された回答
Wesley Ooms
2011 年 9 月 8 日
if i understand correct, instead of 'Mohammad', you should write {@Mohammad} so that it becomes
uimenu('Label','&File'); uimenu(m,'Label','Open','Callback',{@Mohammad});
now you can write your function
function varargout = Mohammad(varargin);
that function can load the data for you
1 件のコメント
Amirhosein Ghenaati
2014 年 11 月 6 日
編集済み: Amirhosein Ghenaati
2014 年 11 月 6 日
if you defines Mohammad in your current directory it works well too
m = uimenu('Label','&File');
uimenu(m,'Label','Open','Callback','Mohammad');
for example define new func in your directory
function Mohammad()
disp('rrr')
end
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Install Products についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!