Updates the selection range when the current selection in the grid has changed.
Source position: grids.pas line 1209
protected procedure TCustomGrid.UpdateSelectionRange; |
UpdateSelectionRange is a method used to update the Selection property with the cell coordinates for the current cell or row in the grid control. UpdateSelectionRange creates a new TRect instance with the cell coordinates representing the current selection in the grid.
UpdateSelectionRange uses values in ColCount, RowCount, and Options to determine whether the rectangle represents an empty selection, a single cell, or all cells in the current Row.
When ColCount and RowCount both contain 0 (zero), the selection range is an empty rectangle (Top, Left, Bottom, and Right members in the rectangle are -1).
When goRowSelect has been included in Options, the rectangle contains the first non-fixed column and last column numbers for the current Row. If row selection is not enabled in Options, the rectangle uses the values in Col and Row to represent both the start and end cells for the selection range.
UpdateSelectionRange is called from the ClearSelections and FixPosition methods.
|
Column index for the selected grid cell. |
|
|
Number of columns in the grid. |
|
|
The number of fixed columns in the grid. |
|
|
Contains the set of optional features and/or behaviors enabled for the grid control. |
|
|
Row number for the selected grid cell. |
|
|
Number of rows in the grid. |
| Version 4.6 | Generated 2026-02-20 | Home |