Add Image to a button

6 ビュー (過去 30 日間)
Milindu
Milindu 2012 年 5 月 27 日
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..

採用された回答

Walter Roberson
Walter Roberson 2012 年 5 月 27 日
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 件のコメント
Milindu
Milindu 2012 年 5 月 27 日
tnx.. it was really helpful.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by