Table of Contents

TPropertyList Class

Holds a list of all properties of a given object instance.

Remarks

TPropertyList holds a list of TProperty objects representing all the properties of an object instance. When the Instance property is set to a valid instance, it automatically loads all properties of the instance and updates the list of properties. If custom properties are registered for the instance class, they are also created as if it was existing properties of the instance.

Syntax

Unit: PropertyList

TPropertyList = class(TObject);

Methods

Name Description
AddEmulated Used internally by the property list to add emulated properties for variant and set types.
Compare Compares two properties for sorting purposes. This method is used by Sort method to sort the properties in the list.
By default, the properties are compared by its name (sorted alphabetically). Override this method if you want to implement a different sort criteria.
CreateProperty Adds a new property in the property list.
Filter Indicates if a property must be included in the property list or not. By default all properties are included, override this method in a descending class if you want to implement some filtering criteria.
FindProperty Retrieves the TProperty object given the property name.
IndexOf Returns the index of the specified property in the property list.
IndexOfName Returns the index of a property given its name.
Update Recreates the internal list of properties based on the current instance set.

Properties

Name Description
Count Retrieves the number of available properties in the property list.
Instance The object instance which holds the list of properties.
Level Retrieves the level of this property list.
Owner Retrieves a reference to the TProperty object that owns this property list.
OwnerList Provides a reference to the TPropertyList that owns this property.
Properties[Index] Provides indexed-access to the TProperty objects representing the available properties of the current Instance.
Root Contains a reference to the root object that owns the object instance.