RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DesignIntf.RegisterComponentEditor Function

Registers an editor so that it is available at design time.

Pascal
procedure RegisterComponentEditor(ComponentClass: TComponentClass; ComponentEditor: TComponentEditorClass);
C++
RegisterComponentEditor(TComponentClass ComponentClass, TComponentEditorClass ComponentEditor);

Call RegisterComponentEditor to allow objects instantiated from the specified ComponentClass or one of its descendants use the editor at design time. A registered component editor (identified by ComponentEditor) is created for each component of ComponentClass that 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. 

ComponentClass must identify a descendant of TComponent. ComponentEditor must identify a descendant of TBaseComponentEditor that implements the IComponentEditor interface. 

If no component editor is registered, the component uses the default component editor. The default component editor (TDefaultEditor) implements Edit to search the events of the component and bring up the code editor for the first event it finds. 

 

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