Sign in Join
FPDoc Onlineexperiment

TStringGrid.OnPrepareCanvas property

Member of TStringGridpublishedIn unit Grids

Event handler signalled to prepare the Canvas to draw the grid.

Declaration

pascal
property OnPrepareCanvas:;

Description

OnPrepareCanvas is a TOnPrepareCanvasEvent property with the event handler signalled to configure the control Canvas to draw a cell at specified coordinates using a specific state. OnPrepareCanvas is signalled (when assigned) from the DoPrepareCanvas method.

OnPrepareCanvas allows the Pen, Brush, Font, and Color defaults assigned in PrepareCanvas to be overridden for a specified column and row to use a specific TGridDrawState value. It offers the last chance to change the appearance of a cell before it is drawn in the DrawCell or ShowCellHintWindow methods.

Use OnDrawCell (implemented in the TCustomDrawGrid descendant) to override the actions performed in the DefaultDrawCell method when DefaultDrawing is enabled.

This description is the one of Grids.TCustomGrid.OnPrepareCanvas.

See also

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