Vcl.Controls.TControl.Create

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

constructor Create(AOwner: TComponent); override;

C++

__fastcall virtual TControl(System::Classes::TComponent* AOwner);

Properties

Type Visibility Source Unit Parent
constructor public
Vcl.Controls.pas
Vcl.Controls.hpp
Vcl.Controls TControl

Description

Creates an instance of TControl.

Calling Create constructs and initializes an instance of TControl. However, you should never attempt to instantiate a TControl. This class is intended solely as a base class from which other control classes descend and you should only call Create to instantiate one of these descendants.

Create calls the parent constructor and initializes the control.

When overriding Create, always call the inherited Create method first, then proceed with the control's initialization. Remember to specify the override directive when overriding the Create method.

Note: If a control's constructor allocates resources or memory, also override the destructor to free those resources.

See Also

Code Examples