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

TCustomGrid.DrawCell

Draws a cell using a given state at the specified grid location (Col, Row, rectangle).

Declaration

Source position: grids.pas line 1056

protected procedure TCustomGrid.DrawCell(

  aCol: Integer;

  aRow: Integer;

  aRect: TRect;

  aState: TGridDrawState

); virtual;

Arguments

aCol

  

Column number for the cell.

aRow

  

Row number for the cell.

aRect

  

Rectangle with the dimensions for the cell.

aState

  

State used to render the cell.

Description

Calls PrepareCanvas to initialize the Canvas for the control to the state in AState. Calls DrawFillRect to fill the rectangle in ARect using the background for the cell. Calls DrawCellGrid to render fixed or non-fixed cells using the state in AState, including horizontal and vertical grid lines when enabled.

DrawCell is called from the DrawRow method when it renders the visible cells in the grid row.

See also

TCustomGrid.PrepareCanvas

  

Prepares the canvas for drawing the cell at the specified location.

TCustomGrid.DrawFillRect

  

Draws the fill rectangle on the specified canvas.

TCustomGrid.DrawCellGrid

  

Draws cell grid lines for the control.

TCustomGrid.DrawRow

  

Draws the columns for the specified row in the grid control.

TCustomControl.Canvas

  

The drawing surface for the control.


Version 4.0 Generated 2025-05-03 Home