Unit 'Controls' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#lcl]

TCustomControl

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

The base class for windowed controls which paint themselves.

Declaration

Source position: controls.pp line 2406

type TCustomControl = class(TWinControl)

protected

  class procedure WSRegisterClass; override;

  

  procedure WMPaint(); message;

  

Handles LM_PAINT messages for the control.

  procedure DestroyWnd; override;

  

Destroys the handle for the Canvas and the interface object.

  procedure PaintWindow(); override;

  

The Paint handler plug-in, intercepting paint requests.

  procedure FontChanged(); override;

  

Performs actions needed when the Font for the control has been changed.

  procedure SetColor(); override;

  

Sets the value for the Color property

  procedure Paint; virtual;

  

Implements the default handler used to draw the control.

public

  constructor Create(); override;

  

Constructor for the class instance.

  destructor Destroy; override;

  

Destructor for the class instance.

  property Canvas: TCanvas; [rw]

  

The drawing surface for the control.

  property BorderStyle: TBorderStyle;

  

Indicates the border style displayed around the control.

  property OnPaint: TNotifyEvent; [rw]

  

Event handler signalled to paint the control.

end;

Inheritance

TCustomControl

  

The base class for windowed controls which paint themselves.

|

TWinControl

  

Implements a windowed control which can contain other child controls.

|

TControl

  

The base class for visible controls.

|

TLCLComponent

  

|

TObject

Description

In contrast to TGraphicControl, a TCustomControl can accept keyboard input (and receive Focus), and can have child controls.

Override the Paint method or supply your own OnPaint handler, to do the actual drawing of the control.

See also

TWinControl

  

Implements a windowed control which can contain other child controls.

TGraphicControl

  

TGraphicControl is the base class for all lightweight controls.



CT Web help

CodeTyphon Studio