ammu
ammu

Reputation: 11

matlab guis using GUIDE

I have a main GUI from which I can open several sub GUIs. I need to write a code such that when I open the sub GUIs, first sub GUI should be closed when I open the second sub GUI but the main GUI should remain open. Can anyone help me out with the code?

Upvotes: 0

Views: 189

Answers (1)

tlawren300
tlawren300

Reputation: 1

If you have the sub gui figure handles (which you should), then you should be able to close them at anytime. Try putting close figure commands in the opening functions of your sub guis. For instance, if you have two sub guis, put some code in the opening function sub gui 1 that checks if sub gui 2 is open and closes it if it is. Do the opposite for sub gui 2.

I don't have time to check this idea, otherwise I would. It seems like it should work though.

Upvotes: 0

Related Questions