[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Forms' (#lcl)

TForm.SessionProperties

Delimited list of form and / or component properties saved to and restored from an external storage mechanism.

Declaration

Source position: forms.pp line 948

published property TForm.SessionProperties : string;

Description

SessionProperties is a String property with the names of properties, in the form instance or its child components. It allows published property values to be saved to and restored from an external storage mechanism like: TIniPropStorage, TXMLPropStorage, or TJSONPropStorage.

Values in the property are delimited using the ';' (SemiColon) character. Component properties require both the component and property names using dotted notation like 'Image1.Visible'. The values can be assigned at design-time using a dialog in the Lazarus IDE, or by setting the property value at run-time.

For example:

// var AForm: TForm;
AForm.SessionProperties := 'Top;Left;WindowState;Image1.Visible;Image1.Transparent';

At design-time, the selection dialog is limited to published properties since RTTI is used to display and access the property values. Use the event handlers in the storage mechanism, or its StoredValues property, to save or restore properties with lesser visibility. Use the Save and Restore methods in the storage mechanism to read and write the property values.

TForm sets the visibility for SessionProperties, introduced in TControl, to published.

See also

TControl.SessionProperties

TCustomPropertyStorage

  

Defines a container used to Save and Restore property values.

TIniPropStorage

  

Implements a class used to store session properties in an INI file.

TXMLPropStorage

  

Implements a class for XML storage of Form Session properties.

TJSONPropStorage

  

Implements the final class for the JSON Form Session Properties storage.


Version 3.2 Generated 2024-02-25 Home