Ananth Saran
Ananth Saran

Reputation: 207

How to make a figure invisible the first time I open in in Matlab GUIDE

I'm making a GUI using matlab GUIDE. Since GUIDE doesn't support tabs, I have a pop down menu where the user selects different options. Depending on the selected options, certain buttons appear and disappear, this is easily handled by turning the handle visibility on/off.

However, the first time I run the GUI, i can see all my buttons, even though their default handle visibility is off. The moment I select something from the pop down menu, everything is fine.

How do I make a figure invisible for the very first time the GUI is opened?

Thanks!

Upvotes: 0

Views: 440

Answers (1)

user2482876
user2482876

Reputation: 298

Try the drawnow command at the end of the initialization code of your GUI (see doc here). It should force the update of the GUI and hopefully set the visibility of your objects correctly.

Upvotes: 1

Related Questions