TCustomDrawGrid.DrawFocusRect procedure
Draws the focus rectangle for the control.
Declaration
procedure DrawFocusRect(aCol: Integer; aRow: Integer; ARect: TRect)
; overrideArguments
aCol | Column number for the cell with the focus rectangle. |
aRow | Row number for the cell with the focus rectangle. |
ARect | TRect instance with the bounds for the cell with the focus rectangle. |
Description
DrawFocusRect is an overridden method used to draw the focus
rectangle for the specified cell when the grid control or its cell
Editor is focused. No actions are performed in the method if
DefaultDrawing is set to
False, or the grid is not
Focused. In addition, the focus rectangle cannot be displayed if
goAlwaysShowEditor has been enabled in
Options and the
Editor is either unassigned (
Nil) or not focused.
DrawFocusRect calls CalcFocusRect to apply the cached visual
information in GCache for the focused cell or row. This includes
adjustments for grid lines when enabled for the control.
When UseXORFeatures is True, the Pen mode in the
Canvas is updated to used the XOR drawing operator and the color
needed for the control. The Canvas state is restored prior to exiting from
the method.
DrawRubberRect is called to draw the rubber band rectangle with
the appropriate borders using the
FocusColor in the control.
DrawFocusRect is called from the DrawRow method.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
