Links
EControl Syntax Editor SDK
TCustomPropsManager Class

Provides properties management functionality.

TCustomPropsManager = class(TComponent);

ecPropManager

This component solves two tasks:

  1. Sharing properties (settings) between objects.
  2. Storing properties (settings) to registry or INI file.

 

TemplateObj specifies root object which is used to get properties' values. 

 

To define managed object list use Add and Remove methods. To get managed objects use Count and Items properties. Use UpdateAll method to copy properties from template object to all managed objects. 

 

Use UseRegistry, IniFileName, IniSection, RootKey to define storage of properties. Use LoadProps and SaveProps to restore and save properties (settings). 

 

Each property may be specified as complex path. Each element of path is delimited with dot. 

Element of path may be:

  1. Property name
  2. Collection item (PropertyName[ItemIndex])
  3. Name of the owned component
  4. "Owner"
Topic 
Description 
The methods of the TCustomPropsManager class are listed here. 
The properties of the TCustomPropsManager class are listed here. 
 
Method 
 
protected 
 
virtual 
 
Property 
 
read only 
TCustomPropsManager Methods 
Description 
Add 
Adds object Obj to managed objects list. 
Copies properties from Obj to Template object. Processes only properties specified in Properties
Copies property PropName from Source to Dest object. 
Copies properties from Dest to Source object. Processes only properties specified in Properties
Copies properties from TemplateObj to Obj object. Processes only properties specified in Properties
Creates and initializes a TCustomPropsManager instance. 
Destroys an instance of TCustomPropsManager. 
Enumerates properties defined in Properties
Loads properties from INI file or registry and assigns them to template object. 
Removes object from managed objects list. 
Saves properties to INI file or registry and assigns them to template object. 
Copies properties from TemplateObj object to all managed objects. 
TCustomPropsManager Properties 
Description 
Returns number of managed objects. 
Specifies name of INI file. 
Specifies INI section name or registry key. 
Lists managed objects. 
Specifies list of properties. 
Specifies root key in registry. 
Specifies template object. 
Specifies storage of properties. 
Copyright (c) 2004-2011. All rights reserved.
What do you think about this topic? Send feedback!