RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomGrid.FocusCell Method

Changes the current cell to a specified cell.

Pascal
procedure FocusCell(ACol: Longint; ARow: Longint; MoveAnchor: Boolean);
C++
__fastcall FocusCell(Longint ACol, Longint ARow, Boolean MoveAnchor);

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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!