Questions regarding GUI inside another GUI (built in GUIDE)

1 回表示 (過去 30 日間)
chlor thanks
chlor thanks 2016 年 8 月 4 日
コメント済み: chlor thanks 2016 年 8 月 5 日
1. If to build a second GUI inside the first GUI, is it as simple as building them seprately in different files and call the second GUI inside the first GUI?
2. If use deploytool to convert this to .exe, do you put both GUIs under "main files", or do you put the first GUI under "main file" and put the second GUI under "Shared Resources and Help Files"?
I have been confused on this topic, please guide me with a more direct answer :) Thank you for reading my concern!!
  2 件のコメント
Walter Roberson
Walter Roberson 2016 年 8 月 4 日
GUIDE guides or your own code or appdesigner ?
Do the GUIs need to communicate at all? Does the first need to get results from the second, or does the second need to get parameters from the first?
chlor thanks
chlor thanks 2016 年 8 月 4 日
Oh I forgot to mention! I created my GUI in GUIDE since my coding skill is very limited. To keep things simple the GUIs will not shared their results or parameters.
Except that to get to the second GUI you have to click a button on the first GUI.

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

採用された回答

Walter Roberson
Walter Roberson 2016 年 8 月 4 日
Put the first one under main file. Make sure it has a %#function pragma reference to the second; see http://www.mathworks.com/help/compiler/function.html
  2 件のコメント
Walter Roberson
Walter Roberson 2016 年 8 月 4 日
If you have two GUIDE GUIs then you can just place a function call to the second from the first. This will result in the figure being created for the GUI, and unless you configure the second GUI specially, the first GUI will continue executing after the second GUI is created. If you need to have the first GUI wait until the second exits, you will need to configure for that.
In particular, GUIDE GUIs return their figure handle when they are first invoked. You can uiwait() on the figure handle to cause the first GUI to wait until the second GUI exits.
uiwait( MySecondGUI() )
chlor thanks
chlor thanks 2016 年 8 月 5 日
Thank you Walter! I believe I will keep them both running for now and stick with using %#function, I am still in the process of finishing the second GUI and I will give this a try after I am done, thanks for all these helpful info, much appreciated!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by