Sign in Join
FPDoc Onlineexperiment

TCustomDBGrid.DefaultDrawCell procedure

Member of TCustomDBGridprotectedIn unit DBGrids

Default method used to drawing a cell at the specified location.

Declaration

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

Arguments

aCol

Column number for the cell.

aRow

Row number for the cell.

aRect

Display rectangle for the specified cell.

aState

Drawing style for the cell background.

Description

DefaultDrawCell is a procedure that provides the default method for drawing a cell at the specified location using different cell types. DefaultDrawCell draws the background for the cell with the specified drawing state. For a cell which appears in a fixed row or column, the text for the cell is also drawn.

When the DataSet for the grid control has rows, the Field for the specified column is retrieved and the cell is drawn using its column editor style. For check box columns, the DrawCheckBoxBitmaps is called. For columns with a button-style editor, the DrawButtonCell method is used. For Fields with a ftMemo data type, the CheckDisplayMemo method is called to determine whether the content in the memo or the DisplayText for the column definition is drawn. Finally, the DrawCellText method is called to draw the specified cell using its state and value.

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