RAD Studio |  |

Specifying Editor Attributes

The property editor must provide information that the Object Inspector can use to determine what tools to display. For example, the Object Inspector needs to know whether the property has subproperties or can display a list of possible values.

To specify editor attributes, override the property editor's GetAttributes method.

GetAttributes is a method that returns a set of values of type TPropertyAttributes that can include any or all of the following values:

Property-editor attribute flags

Flag | Related method | Meaning if included
paValueList | GetValues | The editor can give a list of enumerated values.
paSubProperties | GetProperties | The property has subproperties that can display.
paDialog | Edit | The editor can display a dialog box for editing the entire property.
paMultiSelect | N/A | The property should display when the user selects more than one component.
paAutoUpdate | SetValue | Updates the component after every change instead of waiting for approval of the value.
paSortList | N/A | The Object Inspector should sort the value list.
paReadOnly | N/A | Users cannot modify the property value.
paRevertable | N/A | Enables the Revert to Inherited menu item on the Object Inspector's context menu. The menu item tells the property editor to discard the current property value and return to some previously established default or standard value.
paFullWidthName | N/A | The value does not need to be displayed. The Object Inspector uses its full width for the property name instead.
paVolatileSubProperties | GetProperties | The Object Inspector re-fetches the values of all subproperties any time the property value changes.
paReference | GetComponentValue | The value is a reference to something else. When used in conjunction with paSubProperties the referenced object should be displayed as sub properties to this property.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!