API:DesignEditors.TPropertyEditor

From RAD Studio API Documentation
Jump to: navigation, search

DesignIntf.TBasePropertyEditorSystem.TInterfacedObjectSystem.TObjectTPropertyEditor

Delphi

TPropertyEditor = class(TBasePropertyEditor, IProperty, IPropertyKind, IProperty70)

C++

class PASCALIMPLEMENTATION TPropertyEditor : public Designintf::TBasePropertyEditor

Properties

Type Visibility Source Unit Parent
class public
DesignEditors.pas
DesignEditors.hpp
DesignEditors DesignEditors

Description

TBasePropertyEditor is the base class for all property editors.

DesignEditors.TPropertyEditor inherits from DesignIntf.TBasePropertyEditor. All content below this line refers to DesignIntf.TBasePropertyEditor.

TBasePropertyEditor is the base class for all property editors.

Use TBasePropertyEditor or one of its descendants as a base class when defining a property editor for a specialized property in a new component class. All property editors must descend from TBasePropertyEditor and, in addition, they must support the IProperty interface.

TBasePropertyEditor defines two abstract (pure virtual) protected methods that the Object Inspector calls to inform the property editor of information it may find useful. It does not implement any support for the IProperty interface. This support must be supplied by descendant classes. For example, TBasePropertyEditor has an immediate descendant, TPropertyEditor, which supplies a default implementation of the IProperty interface as well as support for fetching property values of different types. Typically, component writers use TPropertyEditor as a base class when defining new property editors. However, you can derive a property editor directly from TBasePropertyEditor, and avoid the overhead of all methods that handle types that are not needed for your particular property.

Property editors can be associated with all properties of a specified type, or with a particular property of a particular component class. To create the association between a property editor and a property type, call RegisterPropertyEditor. Once the property editor is registered, it appears when the user attempts to edit an appropriate property using the Object Inspector.

See Also