[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Controls' (#lcl)

TCustomControl

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

TCustomControl - a base class for many window controls

Declaration

Source position: controls.pp line 2000

type TCustomControl = class(TWinControl)

  class procedure WSRegisterClass; override;

  

WSRegisterClass - Register this Class for the current Widget Set

protected

  procedure WMPaint(); message;

  

WMPaint - LCL message for painting

  procedure DestroyWnd; override;

  

DestroyWnd - destroy the window for this control

  procedure PaintWindow(); override;

  

PaintWindow - method for painting a window

  procedure FontChanged(); override;

  

FontChanged - method for dealing with a changed font

  procedure SetColor(); override;

  

Set up the colour to be used by the control

  procedure Paint; virtual;

  

The default paint handler for the class

public

  constructor Create(); override;

  

Create - constructor for TCustomControl: performs inherited Create, then creates local Canvas and sets DoubleBuffered to be False

  destructor Destroy; override;

  

Destroy - destructor for TCustomControl: frees local Canvas then performs inherited Destroy

  property Canvas: TCanvas; [rw]

  

The area of a control on which its components are drawn or painted

  property BorderStyle;

  

BorderStyle - none, or single

  property OnPaint: TNotifyEvent; [rw]

  

Event handler for painting

end;

Inheritance

TCustomControl

  

TCustomControl - a base class for many window controls

|

TWinControl

|

TControl

|

TLCLComponent

?

TObject

Description

Contains simple basic definitions to create, destroy and paint window controls and set basic properties like canvas and border

See also

TWinControl

TControl