Help: Display a different layout when pushing a button in a GUI?
1 回表示 (過去 30 日間)
古いコメントを表示
Hi all,
I'm trying to write a programmatic GUI. It includes a push button and a edit text named "tab1" when it initializes. Then when I hit the button the edit text "tab1" will be hidden and the GUI will show the edit text "tab2" which was invisible before hitting the button. I also attached my code which doesn't work.
Any help would be greatly appreciated.
Thanks.
2 件のコメント
採用された回答
Robert Cumming
2014 年 10 月 17 日
The reason your code doesn;t work - is that when the callback for the pushbutton is created the variable S.tab1 doesn't exist. If you moved the pushbutton creation to the end then it would work.
It looks like you are trying to build a GUI with tabs?
その他の回答 (1 件)
Mikhail
2014 年 10 月 14 日
Didn't see your code. In your push button callback function write: set("edit box id",'String','tab2'), where "edit box id" is your edit box identifier (It appears when you create it.)
5 件のコメント
Mikhail
2014 年 10 月 16 日
Hi, no problem. What I recommend to you is to download something in Matlab exchanger and use it as a template for a first time, before you get enough experience.
参考
カテゴリ
Help Center および File Exchange で Migrate GUIDE Apps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!