Sign in Join
FPDoc Onlineexperiment

TCustomDrawGrid.SelectCell function

Member of TCustomDrawGridprotectedIn unit Grids

Determines whether the specified cell can be selected in the grid control.

Declaration

pascal
function SelectCell(aCol: Integer; aRow: Integer): Boolean; override

Arguments

aCol

Column number for the cell.

aRow

Row number for the cell.

Function result

True when the specified cell can be selected in the grid.

Description

SelectCell is an overridden Boolean function used to determine whether the cell specified in ACol and ARow can be selected in the grid control. It is used to respond to focus changes for the control.

SelectCell calls the inherited method on entry to get the return value for the method. The return value is True when both ColWidths and RowHeights have positive non-zero values for the column and row numbers where the cell is located.

SelectCell signals the OnSelectCell event handler (when assigned). The event handler can be used to override the return value based on the column and / or row number.

SelectCell is used in the implementation of methods like TryMoveSelection, CheckPosition, SelectEditor, and GetDeltaMoveNext.

See also

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