Code covered by the BSD License  

Highlights from
GUI with memory - UIREMEMBER & UIRESTORE

4.5

4.5 | 2 ratings Rate this file 18 Downloads (last 30 days) File Size: 11.2 KB File ID: #24669
image thumbnail

GUI with memory - UIREMEMBER & UIRESTORE

by

 

Like many apps, now Matlab GUI can easily "remember" its last state, using these functions.

| Watch this File

File Information
Description

Many apps "remember" their last state. The following functions make this functionality very easy for Matlab GUIs.

UIREMEMBER basically remembers (saves) the object state.
UIRESTORE basically restores the object last saved state.

The simplest way to do it is, for each "need to be remembered" object :
1. Put UIREMEMBER in the object DeleteFcn or Callback .
2. Put UIRESTORE in the object CreateFcn.

Attached is a demo that do it (just run demo.m).

The functions have more advanced usage by options such, which properties to remember / restore and name/location of the save file.
Please use HELP for the full functionality.

MATLAB release MATLAB 7.7 (R2008b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
17 May 2011 Georg

Perfect!
I missed this function for a long time.
Mathworks should add your funtion to Matlab !!!

18 Dec 2010 Thibaut Leroy

Good job!

I would create only one function, but it's another approach. To add uitable's data, you can add this as default properties:
def.uitable = {'Data'};
(it should work)

And instead of having uiremember and uirestore at each uicontrol CreateFcn or DeleteFcn function, I prefer to pass all the objects at one time (all the children of the Graphic Current Figure here):
uiremember(findobj(gcf,'-depth',inf))

18 Dec 2010 Thibaut Leroy  

Contact us