Control Name | Unit | Class |
RX Form Storage | Placement | TFormStorage |
Description:
The TFormStorage
component is a direct descendent of TFormPlacement. In addition
to the
TFormPlacement's properties, methods, and events, this component also allows a component to save its any published property values off to an INI file (or 32-bit registry) and restore the values later.
In 32-bit version, when UseRegistry is True, TFormStorage uses standard TRegIniFile class. So the IniFileName passed to a TFormStorage component becomes a subkey under the system registry’s root key (HKEY_CURRENT_USER by default).
TFormStorage will work with any component or control you might have. Even 3rd party controls or controls you have designed yourself.
- At design-time use component
editor to add published properties of any other
components to list of stored properties of TFormStorage
component.
- To save and restore the
position of TRxSplitter component add to stored
properties the Width or Height (according to Align
property) of one of splitted controls (ControlFirst or
ControlSecond).
- To save and restore active
page of tabbed controls (TNotebook, TTabbedNotebook or
TPageControl) store ActivePage or PageIndex property.
- You can save and restore text
of edit controls by adding to stored properties the Text
property for TEdit or Lines property for TMemo.
- Use TFormStorage to save and
restore state of windowed controls such as TCheckBox,
TRadioGroup etc.
- Link the TFormStorage (or TFormPlacement) component to IniStorage property of some another components to save and load information specific for these components (TRxCheckListBox, TRxDrawGrid, TSpeedbar, TMRUManager, TRxDBGrid) with no additional code.
TFormStorage component allows you to read and write virtually any component published property to an INI file or the system Registry with virtually no code.
Property
Active
Declaration:
Active: Boolean;
Property active defines whether FormStorage service is active or not.
Property
Options
Declaration:
Options: TPlacementOptions;
The Options property tells the TFormPlacement component which parts of the parent form it should read and write to the specified IniFileName.
These are the possible values that can be included in the Options set:
- fpState - state of form (normal, minimize, maximize);
- fpPosition - Top, Left, Height and Width of form;
- fpActiveControl - current Active Control on the form (value of the ActiveControl property).
Property
StoredProps
Declaration:
StoredProps: TStrings;
StoredProps contains the forms controls you have selected or chosen to have their properties stored into a file.
Method
RestoreProperties
Declaration:
procedure RestoreProperties;
procedure RestoreProperties restores the properties of the selected controls and form.
Method
SaveProperties
Declaration:
procedure SaveProperties;
procedure SaveProperties save the properties of the selected controls and form.
Index Page | About | Download
Creation Date: 4 Feb 1998 | Last Update: 16 Mar 2000