How to manage more than one GUI ie main GUI and sub GUI?

1 visualizzazione (ultimi 30 giorni)
Hi all , Suppose i have two GUI's , one is main GUI and the other is sub gui . So i start my work on main GUI and in between , i call sub gui . The sub gui performs a few tasks . But then i want to return to the next line of code of main GUI exactly after the line where i had called the sub gui so that i can continue with the tasks on the main GUI . I have come to know about the inputdlg option but i dont want to just accept input from the users . So i dont want to use inputdlg but i want another user created gui as sub gui where the user can do certain things .
I am learning matlab. So do let me know if such a thing is not possible. And if possible , then plz do try to explain in simple language

Risposta accettata

Adam
Adam il 21 Feb 2017
doc uiwait
doc uiresume
These are what you need if you want a 2nd UI to have focus and for the main program that launched it to wait until the launched GUI closes and focus is returned to the main GUI.
The help should contain examples of this.
Also look at the 'WindowStyle' property of your 2nd figure. Often you will want to make this 'modal' to not allow the user to interact with the other window while the 2nd figure is active.
  2 Commenti
sangeet pillai
sangeet pillai il 23 Feb 2017
Modificato: sangeet pillai il 23 Feb 2017
That helped. Thank you very much. Also one more doubt. Can a selection in sub gui make any changes in main gui simultaneously?or does it affectonly sub gui?
Adam
Adam il 23 Feb 2017
Well, it will affect exactly what you program it to affect. From a design perspective a change in the sub gui should never directly change anything in the main GUI. It may change some underlying object that the main GUI is listening to and then the main GUI may react by altering its own state, but one GUI should never be directly making changes to another GUI if you want good design.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by