[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'DBGrids' (#lcl)

TCustomDBGrid.DefaultDrawColumnCell

Default method used for drawing cells in a column.

Declaration

Source position: dbgrids.pas line 548

public procedure TCustomDBGrid.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.

Checkbox 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 data type of ftBlob are always rendered as the string literal .

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