cxRegisterPropertyEditor(PTypeInfo,TClass,string,TcxPropertyEditorClass) Method
Creates the association between an editor and a property.
Declaration
procedure cxRegisterPropertyEditor(APropertyType: PTypeInfo; AComponentClass: TClass; const APropertyName: string; AEditorClass: TcxPropertyEditorClass);
Parameters
Name | Type |
---|---|
APropertyType | PTypeInfo |
AComponentClass | TClass |
APropertyName | string |
AEditorClass | TcxPropertyEditorClass |
Remarks
For every edited property the runtime object inspector uses property editor. To bind a custom editor to the edited property Delphi requires registering it with the property. This procedure registers the TcxPropertyEditor custom editor with the edited property type. The cxRegisterPropertyEditor procedure has the following parameters:
The APropertyType parameter is a pointer to the TTypeInfo record. For example, TypeInfo(Boolean) identifies the edited property of a Boolean type.
The AComponentClass parameter identifies the type of the component to which this editor applies. If this parameter is nil the editor applies to all properties of the given type.
The APropertyName parameter represents the name of the property. This parameter only has meaning if the previous parameter specifies a particular type of component. In that case you can specify the name of a particular property in that component type to which this editor applies.
The AEditorClass parameter specifies the type of property editor used for editing the specified property.
The example for the full notation for the cxRegisterPropertyEditor procedure will be:
cxRegisterPropertyEditor(TypeInfo(Boolean), nil, '', TcxBoolProperty);