How to disable a gui when running a second existing gui from it

7 views (last 30 days)
Hi, I'm trying to retrieve information from an existing sub-gui (gui 2) which was launched from a button from the primary gui (gui 1). I would like to disable gui 1 until gui 2 has closed to make sure that further functionality of the primary gui (1) is using the all the options/data selected by the user in gui 2.
I can successfully launch and retrieve the data from gui 2 but can't find a way to disable gui 1 until gui 2 has closed/returned. I tried uiwait, but it pauses the figure in whichever gui function it was placed in regardless of the figure handle it is passed. Is there a way to disable a 'parent' gui until a 'child' gui has returned?
Thanks

Accepted Answer

Subhra Saha
Subhra Saha on 28 Apr 2016
To disable the parent GUI when the child GUI is open , you can use the property inspector to set the "WindowStyle" property of the second figure to "modal".
To open property inspector, right click on your GUI window and that should open the window where you can find "WindowStyle" towards the bottom.
Hope this Helps!!

More Answers (0)

Community Treasure Hunt

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

Start Hunting!