Sign in Join
FPDoc Onlineexperiment

TCustomDBGrid.DefaultDrawColumnCell procedure

Member of TCustomDBGridpublicIn unit DBGrids

Default method used to draw cells in a specified column for the grid control.

Declaration

pascal
procedure DefaultDrawColumnCell(const Rect: TRect; DataCol: Integer; 
 Column: TColumn; State: TGridDrawState)

Arguments

Rect

Canvas rectangle for the cell.

DataCol

Index of the Field for cell data.

Column

Column definition for the cell.

State

Grid drawing state for the cell.

Description

DefaultDrawColumnCell is the default method used for drawing cells in a column. DefaultDrawColumnCell uses the specified column to get the Field and the editor style needed to render the cell.

Check box columns are drawn by calling the DrawCheckBoxBitmaps method. Other editor styles use the DisplayText for the TField as the value drawn using the DrawCellText method. Please note that Fields with a DataType property of ftBlob are always rendered as the string literal '(blob)' .

Use the OnDrawColumnCell event handler to render a cell when DefaultDrawing is not enabled for the grid control.

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