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

TGraphicControl

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

TGraphicControl is the base class for all lightweight controls.

Declaration

Source position: controls.pp line 1901

type TGraphicControl = class(TControl)

protected

  procedure WSRegisterClass; override;

  

WSRegisterClass - Register this Class for the current Widget Set

  procedure FontChanged(); override;

  

FontChanged - method for dealing with a changed font

  procedure Paint; virtual;

  

Virtual Paint method called in response to paint requests.

  procedure DoOnChangeBounds; override;

  

Calls the OnChangeBounds event handler

  procedure DoOnParentHandleDestruction; override;

  property OnPaint: TNotifyEvent; [rw]

  

OnPaint - event handler for request to paint canvas

public

  constructor Create(); override;

  

Create - constructor for TGraphicControl: performs inherited Create then creates local Canvas

  destructor Destroy; override;

  

Destroy - destructor for TGraphicControl: frees local canvas and performs inherited Destroy

  property Canvas: TCanvas; [r]

  

A clipping window to the parent canvas.

end;

Inheritance

TGraphicControl

  

TGraphicControl is the base class for all lightweight controls.

|

TControl

  

TControl - the main ancestor class for visual controls.

|

TLCLComponent

?

TObject

Description

TGraphicControl supports simple lightweight controls that do not need the ability to accept keyboard input or contain other controls.

Since lightweight controls do not wrap GUI screen objects, they are faster and use fewer resources than controls based on TWinControl.

TGraphicControl provides a Canvas property for access to the control's drawing surface and a virtual Paint method called in response to paint requests received by the parent control.

See also

#lcl.Controls.TWinControl

  

TWinControl - the base class for all windowed controls

#lcl.Graphics.TCanvas

  

TCanvas - where most of the drawing is performed