Vcl.Grids.TCustomGrid.FocusCell

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure FocusCell(ACol, ARow: Longint; MoveAnchor: Boolean);

C++

void __fastcall FocusCell(int ACol, int ARow, bool MoveAnchor);

Properties

Type Visibility Source Unit Parent
procedure
function
protected
Vcl.Grids.pas
Vcl.Grids.hpp
Vcl.Grids TCustomGrid

Description

Changes the current cell to a specified cell.

TCustomGrid calls FocusCell internally to change the currently selected cell. FocusCell changes the current cell and updates the selection appropriately.

ACol is the column of the cell to select.

ARow is the row of the cell to select.

MoveAnchor determines how the selection changes. If the grid does not allow multiple cells to be selected (Options does not include goRangeSelect), MoveAnchor is ignored and the specified cell becomes the selected cell. If the grid allows multiple cells to be selected, MoveAnchor determines whether the new cell becomes the starting cell (anchor) of a new selection, or whether the current selection is updated to range from the current anchor to the specified cell.

See Also