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

# TCustomGrid.Paint

Draws the edges, borders, and rows in the grid control.

## Declaration

Source position: grids.pas line 1162

`protected procedure TCustomGrid.Paint; override;`

## Description

Paint is an overridden method in TCustomGrid used to update and draw the grid control.

Values in GridFlags and GCache are examined to determine if a visual change to the columns or the client area for the control is in progress. For either condition, the ResetSizes method is called to handle the visual change(s) and the flag values are removed from GridFlags.

Paint calls the inherited method to signal the OnPaint event handler in the ancestor class.

If there are no other active updates for the control, methods are called to draw the edges and all visible rows in the control. If a column move operation is in effect, the Canvas is updated to display a drag cursor with the color defined in the grid. Borders for the control are drawn prior to exiting from the method.

## See also

TCustomControl.Paint |  | Implements the default handler used to draw the control.