DesignEditors.TDefaultEditor

From RAD Studio API Documentation
Jump to: navigation, search

DesignEditors.TComponentEditorDesignIntf.TBaseComponentEditorSystem.TInterfacedObjectSystem.TObjectTDefaultEditor

Delphi

TDefaultEditor = class(TComponentEditor, IDefaultEditor)

C++

class PASCALIMPLEMENTATION TDefaultEditor : public TComponentEditor

Properties

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

Description

TDefaultEditor is the component editor for components that do not explicitly register a component editor.

When a component class does not have a registered property editor, TDefaultEditor controls its response to right clicks, double clicks, and clipboard commands.

TDefaultEditor does not add any custom menu items to the context menu that appears when the user right-clicks a component in the designer, nor does it add any clipboard formats to the standard component format. However, TDefaultEditor does override the Edit method to supply a default response when the user double clicks a component.

The Edit method in TDefaultEditor searches the component for events. If it finds an OnCreate event, it brings up the code editor for the OnCreate event handler. If there is no OnCreate event, it brings up the code editor for the OnChange event handler. If there is no OnChange event, it brings up the code editor for the OnClick event handler. If it finds none of these events, it brings up the code editor for the first event it finds.

Use TDefaultEditor as a base class when creating component editors that bring up the code editor as the default response to a double click.

See Also