Sign in Join
FPDoc Onlineexperiment

TCustomGrid.DrawCell procedure

Member of TCustomGridprotectedIn unit Grids

Draws a cell using a given state at the specified grid location (Col, Row, rectangle).

Declaration

pascal
procedure DrawCell(aCol: Integer; aRow: Integer; aRect: TRect; 
 aState: TGridDrawState); virtual

Arguments

aCol

Column number for the cell.

aRow

Row number for the cell.

aRect

Rectangle with the dimensions for the cell.

aState

State used to render the cell.

Description

Calls PrepareCanvas to initialize the Canvas for the control to the state in AState. Calls DrawFillRect to fill the rectangle in ARect using the background for the cell. Calls DrawCellGrid to render fixed or non-fixed cells using the state in AState, including horizontal and vertical grid lines when enabled.

DrawCell is called from the DrawRow method when it renders the visible cells in the grid row.

See also

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