Saving status of GUI

Hi all,

I have a rather complex GUI with many widgets (TGComboBoxes, TGNumberEntries, …) and it would be nice if the user could just save the status of the GUI (e.g. numbers in the TGNumberEntries or what is selected in ComboBoxes, …) to continue working at a later point.

The obvious way would of course be to write a Save() and a Load() function which asks all the widgets for their status one by one and writes all that to disk. However, I was wondering whether there might be a more clever way to do that, since all the things are TObjects and they have a well defined owner-structure.

Any ideas would be highly appreciated!



Hi Jens,

There is no generic way of doing this. You can obviously save your full GUI (all the widgets with their values), but I thinks it is a bit heavy to just save the values…
You should structure your data yourself and then save and load them from a ROOT file or with the help of a TEnv class (see for example how it is done in $ROOTSYS/test/RootShower)

Cheers, Bertrand.