RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TComponentEditor Class

TComponentEditor provides the default implementation for the IComponentEditor interface.

Pascal
TComponentEditor = class(TBaseComponentEditor, IComponentEditor);
C++
class TComponentEditor : public TBaseComponentEditor, public IComponentEditor;

DesignEditors

Use TComponentEditor or one of its descendants as a base class when defining a design-time editor for working with a new component class. Although you can create component editors that descend directly from TBaseComponentEditor, it is convenient to use TComponentEditor, because this class supplies a default implementation of the IComonentEditor interface. 

Create a new component editor class for a component class to add verbs to its context menu, change its default double-click behavior, or allow the component to use a new clipboard format.  

Once the component editor is defined, it can be registered to work with a particular component class. A registered component editor is created for each component of that class when it is selected in the form designer. When the component is double-clicked, the Edit method of the component editor is called. When the user right-clicks the component, the GetVerbCount and GetVerb methods of the editor are called to build context menu. To create the association between a component editor and a component class, call RegisterComponentEditor. 

 

RegisterComponentEditor 

TDefaultEditor

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!