TCustomDrawGrid.DefaultDrawCell procedure
The default method used to draw the cell at the given position using a specific state.
Declaration
procedure DefaultDrawCell(aCol: Integer; aRow: Integer;
var aRect: TRect; aState: TGridDrawState)
; virtualArguments
aCol | Column number for the cell. |
aRow | Row number for the cell. |
aRect | Rectangle with the bounds for the cell. |
aState | Drawing state for the cell. |
Description
DefaultDrawCell is a method which provides the default drawing
routine for the cell at the position specified in
ACol and
ARow. The bounds for the cell are provided in the
ARect
parameter.
AState contains the drawing state for the cell.
DefaultDrawCell handles the following drawing tasks when needed for the specified cell:
- Draws fixed cells using the TitleStyle for the control. Calls DrawThemedCell when TitleStyle is set to tsNative. Otherwise, DrawFillRect is used.
- Draws the bitmap needed for a cell using the check box button style. Calls DrawCellCheckboxBitmaps to render the bitmap for the check box control.
- Draws a cell using the Button style. Calls DrawButtonCell to render the button in the required state.
- Draws auto-numbered fixed row headers when enabled in the Options for the control. Calls DrawCellAutonumbering to render the relative non-fixed row number.
- Draws the text displayed in the cell. Calls DrawColumnText when the cell is a fixed column header. Otherwise, the DrawTextInCell method is used.
DefaultDrawCell is called from the DrawCell method. It is used when the DefaultDrawing property is set to True, and occurs prior to signalling the OnDrawCell event handler (when assigned). It is always called when OnDrawCell has not been assigned.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
