[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Grids' (#lcl)

TCustomGrid.UpdateSelectionRange

Updates the selection range when the current selection in the grid has changed.

Declaration

Source position: grids.pas line 1208

protected procedure TCustomGrid.UpdateSelectionRange;

Description

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 Options to determine whether the rectangle represents a single cell or the current Row. When goRowSelect has been included in Options, the rectangle contains the non-fixed column and last column numbers in the current Row. Otherwise, the rectangle uses the value in Col and Row to represent both the start and end cells for the Selection.

UpdateSelectionRange is called from the ClearSelections and FixPosition methods.

See also

TCustomGrid.Col

  

Column index for the selected grid cell.

TCustomGrid.ColCount

  

Number of columns in the grid.

TCustomGrid.FixedCols

  

The number of fixed columns in the grid.

TCustomGrid.Row

  

Row number for the selected grid cell.


Version 4.0 Generated 2025-05-03 Home