Table of Contents

TIDEComponentEditor Class

Base class for creating custom component editor and context menus for the form designer.

Remarks

Create classes descending from TIDEComponentEditor to allow custom component editor and context menus for specific components. For example, if you want to display a custom dialog when the user double clicks a TTable, or if you want to display custom popup menu items when user right clicks a TEdit control, then you must create a class descending from TIDEComponentEditor, override some methods like Edit or GetVerbCount, and then register the new editor using RegisterIDEComponentEditor.

Syntax

Unit: FormDesigner

TIDEComponentEditor = class(TComponent);

Methods

Name Description
Edit Override Edit method to specify a custom action to be performed when the end-user double clicks a component in the form designer. You can, for example, call a modal dialog to edit some component properties.
The Edit method won't be called unless the method HasEditor returns true.
ExecuteVerb Override this method to specify a action for a custom context menu item. When the end-user right clicks a component in the designer and chooses a menu item, ExecuteVerb method is called.
GetComponent Returns the instance of the component associated with this component editor, that is being edited in the form designer.
GetDesigner Provides a reference to the form designer component.
GetVerb Override GetVerb method to specify the caption of the context menu item. When the end-user right clicks a component in the designer, several menu items are displayed, in addition to the default menu items provided by TAdvCustomForm​Designer.​Popup​Menu.​
GetVerbCount Override GetVerbCount method to specify the number of additional context menu items that will appear when the end-user right clicks a component in the form designer.
HasEditor Override this method to tell the designer to call Edit method when end-user double clicks a component.
Edit method will only be called if HasEditor returns true.