Purpose Allow the user to save the selected table layout In a self-defined table control the user can change the column widths and the order of the columns with the mouse. The adjustments are only valid for the current session. This tip shows how you can give the user the option of saving the current table layout and loading it automatically when the table is displayed again. |
Solution We add tow buttons which allow the user to save the table layout and to restore the standard layout. For storing the settings we use a local text file. Our starting point is the following table:
GuiXT
We add buttons to save and restore the layout:
GuiXT
We finally add an include
which loads the user settings when the table is displayed the first time:
|
InputScript "save_tablesettings.tabx1.txt" GuiXT
InputScript
"restore_tablesettings.tabx1.txt""
Include
file "load_tablesettings.tabx1.txt""
|
Components |