Create a second GUI when a pushbutton is pressed

Hi,
I imagine this is fairly straight forward to do... I have created a set of edit boxes in a panel which need to be filled in and have a send button which triggers them to be sent over UDP to another program.
Now what I want to do is have everything within that panel be in a separate GUI window which pops up when a push button is clicked as it is not needed in the main GUI window the whole time.
How is this done?
Cheers,

 採用された回答

geieraffe
geieraffe 2012 年 4 月 24 日

0 投票

Hey John,
just save your data you want to show in the second GUI in the handles, like
handles.mydata = mydata;
or with setappdata() to a GUI:
firstGUI = gcf;
setappdata(firstGUI, 'mydata', mydata);
then start the second GUI with pushbutton_callback and handles.mydata as argument for the second GUI, or get the stored data with getappdata() in your second GUI:
mydata = getappdata(firstGUI, 'mydata');

1 件のコメント

John
John 2012 年 4 月 24 日
Thank you for this, I will accept when I get a chance to test.
Cheers

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

製品

タグ

質問済み:

2012 年 4 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by