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

TCustomGrid.SelectCell

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

Declaration

Source position: grids.pas line 1184

protected function TCustomGrid.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.


Version 4.0 Generated 2025-05-03 Home