Sign in Join
FPDoc Onlineexperiment

TCustomGrid.AddSelectedRange procedure

Member of TCustomGridprotectedIn unit Grids

Adds the current range selection to the array of selection rectangles for the control.

Declaration

pascal
procedure AddSelectedRange

Description

AddSelectedRange is a method used to add the rectangle for the current range selection to the internal member used to store the selection rectangle(s). It increases the capacity for the member and appends the value for the current selection rectangle.

No actions are performed in the method if goRangeSelect has not been included in the Options property, or when RangeSelectMode has a value other than rsmMulti.

Use ClearSelections to remove range selection rectangle(s) stored using AddSelectedRange.

AddSelectedRange is called from MouseDown when a Ctrl+Click or Meta+Click (macOS) mouse event occurs in the data area for the grid and range selection has been enabled for the control. Precautions have been taken in the calling procedure to avoid adding the same cells to more than one selection range. There are some combinations of user commands, however, where this cannot be eliminated completely.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.