Sign in Join
FPDoc Onlineexperiment

TCustomDBGrid.PrepareCanvas procedure

Member of TCustomDBGridprotectedIn unit DBGrids

Prepares the Canvas to render the specified cell with the drawing state in aState.

Declaration

pascal
procedure PrepareCanvas(aCol: Integer; aRow: Integer; 
 aState: TGridDrawState); override

Arguments

aCol

Column number for the cell.

aRow

Row number for the cell.

aState

Grid draw state for the cell.

Description

PrepareCanvas is an overridden method in TCustomDBGrid. It ensures that the Canvas is configured to use the drawing state in aState. PrepareCanvas calls the inherited PrepareCanvas method, and sets the brush color in the Canvas to the value needed for fixed or focused / selected columns.

PrepareCanvas is called from the DrawCell method. It occurs before default drawing is performed, and before the OnDrawColumnCell or OnDrawColumnTitle event handlers are signalled.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.