DesignIntf.RegisterComponentEditor

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure RegisterComponentEditor(ComponentClass: TComponentClass;
ComponentEditor: TComponentEditorClass);

C++

extern DELPHI_PACKAGE void __fastcall RegisterComponentEditor(System::Classes::TComponentClass ComponentClass, TComponentEditorClass ComponentEditor);

Properties

Type Visibility Source Unit Parent
procedure
function
public
DesignIntf.pas
DesignIntf.hpp
DesignIntf DesignIntf

Description

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

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 the 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.

See Also

Code Examples