DesignEditors.TComponentEditor.GetComponent

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GetComponent: TComponent;

C++

System::Classes::TComponent* __fastcall GetComponent(void);

Properties

Type Visibility Source Unit Parent
function public
DesignEditors.pas
DesignEditors.hpp
DesignEditors TComponentEditor

Description

Returns the value of the Component property.

Use GetComponent to read from and make changes to the component associated with the component editor. Calling GetComponent is equivalent to reading the Component property, but unlike the Component property, is available through the IComponentEditor interface.

A component editor is created for each instance of the registered component class when it is selected in the form designer. GetComponent returns the selected instance.

Note: When the component editor makes changes to the component, it must call the Modified method of the form designer that is specified by the Designer property.

See Also