Skip to main content

TcxPropertiesStore Class

Represents a TcxPropertiesStore component.

Declaration

TcxPropertiesStore = class(
    TcxCustomPropertiesStore
)

Remarks

The TcxPropertiesStore component is used to save and restore component-specific information to a storage of a specific type. It allows you to store/restore required published properties of selected components on the form containing the PropertiesStore component.

The PropertiesStore component provides a design-time editor to choose components and their properties to save/restore using the storage.

The TcxPropertiesStore supports the following storage types: registry, INI file and stream.

To enable the TcxPropertiesStore object:

  1. Place a TcxPropertiesStore component on a form.

  2. Specify the components and their properties to be stored/restored using the storage.

  3. Specify the storage name and type via the StorageName and StorageType properties.

When the form is opened, TcxPropertiesStore attempts to read settings of the selected components from the storage. If the storage exists, its property settings replace the settings of existing components. When the form is destroyed, the storage is recreated and properties of the selected components are saved. Disable this automatic functionality by setting its Active property to False.

Manual operation is also available by calling the StoreTo and RestoreFrom methods to store/restore selected component settings to the current storage at any time.

The TcxPropertiesStore allows the saving and restoring of properties at design time. The storage for design time saving/restoring is identified by the StorageName and StorageType properties.

Refer to the TcxCustomPropertiesStore description for information on property types that can be stored/restored.

See Also