DesignEditors.TDefaultEditor.EditProperty

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure EditProperty(const Prop: IProperty; var Continue: Boolean); virtual;

C++

virtual void __fastcall EditProperty(const Designintf::_di_IProperty Prop, bool &Continue);

Properties

Type Visibility Source Unit Parent
procedure
function
protected
DesignEditors.pas
DesignEditors.hpp
DesignEditors TDefaultEditor

Description

Scans through the event handlers of the component and selects the one that the Edit method displays.

The Edit method uses EditProperty to identify the property editor it displays when the user double-clicks. Edit scans through the properties and events of the component, calling EditProperty (indirectly) with the property editor for each property and event. EditProperty sets two internal class members, FBest and FFirst, to the best property editor it finds and the first appropriate property editor it finds. After all the properties and events are scanned or the Continue parameter is set to false, the Edit method calls the Edit method of the property editor selected by EditProperty (FBest if it is available, otherwise FFirst).

As implemented in TDefaultEditor, EditProperty only accepts property editors for events.

Override EditProperty to change the property editor that appears when the user double-clicks the component. You can filter the events that are viewed by TDefaultEditor's EditProperty method (as shown in the example), or set FBest and FFirst to the property editor you want displayed.

Prop is the interface of the property editor for the current property.

Continue indicates whether the component editor should continue scanning properties. Set Continue to false if the desired property editor has been found and there is no need to continue scanning.

See Also