Unit 'Grids' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#lcl]

TCustomGrid.MouseToCell

Converts mouse coordinates to the grid coordinates for a cell in the grid.

Declaration

Source position: grids.pas line 1339

public function TCustomGrid.MouseToCell(

  const Mouse: TPoint

):TPoint; overload;

procedure TCustomGrid.MouseToCell(

  X: Integer;

  Y: Integer;

  out ACol: LongInt;

  out ARow: LongInt

); overload;

Arguments

Mouse

  

TPoint instance with the mouse coordinates converted in the method.

Function result

TPoint instance with the grid coordinates for the cell.

Arguments

X

  

Horizontal coordinate for the mouse.

Y

  

Vertical coordinate for the mouse.

ACol

  

Column number for the mouse position.

ARow

  

Row number for the mouse position.

Version info

ACol and ARow arguments were changed to output parameters in LCL version 2.1 (revision 65087).