TCustomGrid.ClearSelections procedure
Clears the current range selection(s) and redraws the grid control.
Declaration
procedure ClearSelectionsDescription
ClearSelections is a method used to remove all selection
rectangles in an internal member for the grid control. These are the values
stored using AddSelectedRange when multi-selection is enabled in the Options
for the control.
ClearSelections clears the internal storage for selection ranges and calls UpdateSelectionRange to reset the current selection on the control. The selected range is an empty rectangle (where Left, Top, Bottom, and Right members are -1) when ColCount and RowCount contain 0 (zero).
When goRowSelect has been included in Options, a range
selection for all non-fixed cells in the current row is created. The pivot
point (selection anchor) for extending the range selection is set to the
values in Col and Row.
ClearSelections calls InvalidateGrid to redraw the grid control when another update is not already in progress.
ClearSelections is called from the Clear method, and when a new value is assigned to the RangeSelectMode property. It is also called from the MouseDown method when a range selection is handled for the non-fixed area on the grid control.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
