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

TCustomControl.Canvas

The drawing surface for the control.

Declaration

Source position: controls.pp line 2422

public property TCustomControl.Canvas : TCanvas
  read FCanvas
  write FCanvas;

Description

Canvas is a TCanvas property which contains the drawing surface for the control. Resources for the property are allocated in the constructor for the class instance. A TControlCanvas descendant is created and assigned to the member for the property. The Handle for the Canvas is updated when PaintWindow is called for a specific device context.

Changing values in the Font or Color properties causes settings in Canvas to be updated. A new value assigned to Font is also assigned to the Canvas in the control, and includes the PixelsPerInch setting for the Font. A new value assigned to Color is applied to the Brush in Canvas. A value assigned to BorderStyle must be handled in the routine assigned to the OnPaint event handler.

See also

TCustomControl.Canvas

  

The drawing surface for the control.

TCustomControl.OnPaint

  

Event handler signalled to paint the control.

TWinControl.BorderStyle

  

Indicates the border style displayed around the control.

TControl.Font

  

The font to be used for text display in this control.

TControlCanvas

  

Base class which provides a canvas property used in graphic controls.

TCanvas

  

Implements a drawing surface for a visual control or bitmap image.



CT Web help

CodeTyphon Studio