Sign in Join
FPDoc Onlineexperiment

TCustomGrid.SelectCell function

Member of TCustomGridprotectedIn unit Grids

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

Declaration

pascal
function SelectCell(ACol: Integer; ARow: Integer): Boolean; virtual

Arguments

ACol

Column number for the cell.

ARow

Row number for the cell.

Function result

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

Description

SelectCell is a Boolean function used to determine whether the cell specified in ACol and ARow can be selected in the grid control. 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 is used in the implementation of methods like TryMoveSelection, CheckPosition, SelectEditor, and GetDeltaMoveNext. It is overridden in TCustomDrawGrid to signal the OnSelectCell event handler (when assigned).

Component developers may use the SelectCell method to react to focus changes. The Result is True if the cell can be selected.

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