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

# TCustomDBGrid.DrawCellBackground

Draws the background for the cell at the specified coordinates.

## Declaration

Source position: dbgrids.pas line 445

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

## 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 specified cell.
`aState` |  | Drawing state for the specified cell.

## Description

DrawCellBackground uses the value in aState and the TitleStyle property to determine the drawing method for the cell. Fixed cells using the native title style are drawn by calling the DrawThemedCell method. Otherwise, the FillRect method in the control Canvas is called to draw the cell background.

DrawCellBackground is called from the DrawCell method.