[Overview][Constants][Types][Classes][Procedures and functions][Index] |
Draws the current selection in the grid in a focused state.
Source position: dbgrids.pas line 446
protected procedure TCustomDBGrid.DrawFocusRect( |
aCol: Integer; |
aRow: Integer; |
ARect: TRect |
); override; |
aCol |
|
Column number for the cell drawn with the focus rectangle. |
aRow |
|
Row number for the cell drawn with the focus rectangle. |
ARect |
|
Rectangle for the focus "rubberband" calculated in the method. |
DrawFocusRect is an overridden procedure used to draw the current selection in the grid in a focused state.
The grid control must have focus before the current selection can be drawn. In addition the DataLink for the control must refer to an active dataset. DrawFocusRect checks the Options property to ensure that dgAlwaysShowSelection has been included for the control. Finally DefaultDrawing must be enabled to allow drawing of the focus rectangle using the rubber band style on the Canvas for the control.
If any of the previous conditions are not met, no actions are performed in the method.
DrawFocusRect calls CalcFocusRect to get the bounds for the focus rectangle adjusted for optional grid lines. The DrawRubberRect method is called to render the focus rectangle with the needed borders using the FocusColor for the control.
|
Draws the focus rectangle for the specified cell. |
|
|
Calculates the bounds for a focus rectangle in the grid control. |
|
|
The color used to draw the focus rectangle when a cell has focus. |
Version 3.2 | Generated 2024-02-25 | Home |