How do I save the property settings of my GUI when it closes?
4 views (last 30 days)
Show older comments
I would like to save the values from my GUI when it closes, so the next time that it opens it has the same values.
Accepted Answer
MathWorks Support Team
on 27 Jun 2009
There are two ways you could save the data from your GUI, to be used the next time it initializes:
1) Resave the entire GUI to the same figure file. The figure file will then contain the same property values as the GUI. If you only want to use some of the same values, then you could either change the values when the GUI starts, in its OpeningFcn, or you could change the values right before saving the GUI to the figure file, in its ClosingFcn.
2) Save specific property values to a MAT file, which is then loaded in the figure's OpeningFcn, and used to set the property values.
0 Comments
More Answers (0)
See Also
Categories
Find more on Interactive Control and Callbacks in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!