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
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?
Niki
Niki 2011년 9월 8일
Yes, It was what I wanted,
as you know based on above command you can just create a label but I did not know how to callback , but Wesley helped me and it works now,
right now i have another problem , please see the following question

댓글을 달려면 로그인하십시오.

 채택된 답변

Wesley Ooms
Wesley Ooms 2011년 9월 8일

0 개 추천

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
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개)

Niki
Niki 2011년 9월 8일

0 개 추천

How can I add one bottom for this? for example this I have a windows , then i want to either open from the "file"---> "open" which works now
or a bottom on the window

카테고리

도움말 센터File Exchange에서 Install Products에 대해 자세히 알아보기

태그

질문:

2011년 9월 8일

편집:

2014년 11월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by