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

# TCustomDBGrid.DrawColumnText

Draws the text for the cell at the specified coordinates.

## Declaration

Source position: dbgrids.pas line 448

`protected procedure TCustomDBGrid.DrawColumnText(`
`aCol: Integer;`
`aRow: Integer;`
`aRect: TRect;`
`aState: TGridDrawState`
`); override;`

## Arguments

`aCol` |  | Column number for the cell drawn in the method.
`aRow` |  | Row number for the cell drawn in the method.
`aRect` |  | Display rectangle for the cell.
`aState` |  | Grid drawing state for the cell.

## Description

DrawColumnText is an overridden method in TCustomDBGrid used to draw the text for the cell at the position in ACol and ARow.

If the cell is a fixed column title, the inherited method is called to render the image and /or text for the column header.

For data cells,the field type for the cell is checked. For a Memo field, the content in the field is used when dgDisplayMemoText has been included in the Options property. Otherwise, the DisplayText for the field is used.

The DrawCellText method is called to render the text value with the drawing state in aState.

DrawColumnText is called from the DrawFixedText and DefaultDrawCell methods.