[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Draws cell grid lines for the control.
Source position: grids.pas line 1057
protected procedure TCustomGrid.DrawCellGrid( |
aCol: Integer; |
aRow: Integer; |
aRect: TRect; |
aState: TGridDrawState |
); virtual; |
aCol |
|
Column number for the cell. |
aRow |
|
Row number for the cell. |
aRect |
|
Rectangle with the screen coordinates for the cell. |
aState |
|
State for the cell (normal, fixed, pushed, et. al.). |
DrawCellGrid is a procedure used to draw cell grid lines for both a fixed and a non-fixed cell in the grid control.
DrawCellGrid ensures that the control Canvas (and its Pen) are updated to use the values needed to draw the fixed or non-fixed cell at the location specified in ACol and ARow.
For a fixed cell (when gdFixed is in AState), grid lines are drawn when gdoFixedVertLine or gdoFixedHorzLine is found in the Options property. The Pen in the control Canvas is updated to reflect a non-zero value in GridLineWidth.
When Flat is set to False, the value in AState is used to determine the color used for the Pen. Canvas drawing methods, like MoveTo and LineTo, are used to draw the cell grid lines at the coordinates in ARect. The value in UseRightToLeftAlignment determines how values in ARect are adjusted for the operation.
When Flat is set to True, the value in FixedGridLineColor is used as the color for the Pen.
For a non-fixed cell (gdFixed is not in AState), grid lines are drawn when gdoVertLine or gdoHorzLine is found in the Options property. The Pen in the control Canvas is updated to use the GridLineWidth, GridLineStyle, and GridLineColor for the control. Canvas drawing methods, like MoveTo and LineTo, are used to draw the cell grid lines at the coordinates in ARect. The value in UseRightToLeftAlignment determines how values in ARect are adjusted for the operation.
DrawCellGrid is called from the DrawCell method after preparing the Canvas and drawing the filled rectangle with the background for the cell.
|
Contains the set of optional features and/or behaviors enabled for the grid control. |
|
|
Draws a cell using a given state at the specified grid location (Col, Row, rectangle). |
|
|
Indicates if cells are displayed using a Flat appearance. |
|
|
Color used to draw the separator lines for fixed grid cells. |
|
|
Color used for the grid lines on the control. |
|
|
Style used to draw the grid lines on the control. |
|
|
Width (thickness) for grid lines drawn on the control. |
|
|
True when BiDiMode is bdRightToLeft. |
Version 4.0 | Generated 2025-05-03 | Home |