Add Image to a button

9 Ansichten (letzte 30 Tage)
Milindu
Milindu am 27 Mai 2012
I successfully add few .jpg images to few buttons, but when I move to this(GUI with images) GUI from another GUI using
function pushbutton3_Callback(hObject, eventdata, handles)
open('menu_page1.m');
the images I assign to the buttons are not shown,Please help me out..

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 27 Mai 2012
open('menu_page1.m') opens the file menu_page1.m in the MATLAB editor, and does not execute the code.
You should either call the code (if it is a function) or run() the code (if it is a script)
menu_page1() %calls a function
run('menu_page1.m') %executes a script
  1 Kommentar
Milindu
Milindu am 27 Mai 2012
tnx.. it was really helpful.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by