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

TCustomGrid.MoveNextSelectable

Moves to the next selectable cell in the specified direction.

Declaration

Source position: grids.pas line 1157

protected function TCustomGrid.MoveNextSelectable(

  Relative: Boolean;

  DCol: Integer;

  DRow: Integer

):Boolean; virtual;

Arguments

Relative

  

True if the selection is extended in the direction indicated by DCol and DRow. False if the selection is moved to the destination cell.

DCol

  

Destination column for the selection.

DRow

  

Destination row for the selection.

Function result

True if the selection was successfully moved or extended in the method.

Description

MoveNextSelectable is a Boolean function used to move either or extend the selection in the grid control by a specified number of selectable columns and rows.

Relative indicates whether the column and row arguments are relative to the current Col and Row (or current cell), or represent an absolute cell address.

When Relative is set to True, DCol and DRow can have positive or negative values which indicate the direction in which the selection is moved or extended. A positive value in DCol indicates the selection moves to the right. A negative moves the selection to the left. A positive value in DRow moves the selection towards the bottom of the grid. A negative value moves the selection towards the top of the grid.

Applications do not normally call MoveNextSelectable; it is used in the implementation of methods like:

It is also called when a new value is assigned to the FixedCols or FixedRows property.


Version 4.0 Generated 2025-05-03 Home