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

TCustomGrid.PrepareCanvas

Prepares the canvas for drawing the cell at the specified location.

Declaration

Source position: grids.pas line 1164

protected procedure TCustomGrid.PrepareCanvas(

  aCol: Integer;

  aRow: Integer;

  aState: TGridDrawState

); virtual;

Arguments

aCol

  

Column number for the cell.

aRow

  

Row number for the cell.

aState

  

Drawing state applied to the canvas for the specified cell.

Description

PrepareCanvas ensures that the Canvas for the control is properly configured to draw the cell at ACol and ARow using the drawing state specified in AState. Flags in AState and the values from the Options, Enabled, DefaultDrawing and EditorMode properties determine the Pen, Brush, Font, and TextStyle settings used in the control Canvas.

PrepareCanvas is called from ShowCellHintWIndow when truncated cell hints are enabled in the Options for the grid. It is also called from DrawCell before drawing the filled rectangle and grid lines for the cell.


Version 3.2 Generated 2024-02-25 Home