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

TGraphicControl.Canvas

A clipped window into the parent Canvas.

Declaration

Source position: controls.pp line 2395

public property TGraphicControl.Canvas : TCanvas
  read FCanvas;

Description

Don't paint on the entire Canvas! Instead use the dimensions of the TGraphicControl stored in the ClientRect.

If you ask for the Canvas.Width or Canvas.Height, you are actually getting the Canvas dimensions from the Parent control.

See also

TControl.ClientRect

  

Size of the client area for the control.

TControl.ClientWidth

  

The width of the client area of the control.

TControl.ClientHeight

  

The height of the client area of the control.

TControl.BoundsRect

  

The TopLeft and BottomRight of the control, in client coordinates.

TCanvas

  

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

The latest version of this document can be found at lazarus-ccr.sourceforge.net.