TCustomGrid.MouseToLogcell function
Converts mouse coordinates to logical cell coordinates on the grid.
Declaration
function MouseToLogcell(Mouse: TPoint): TPointArguments
Mouse | TPoint instance with the physical mouse coordinates in its X and Y members. |
Function result
TPoint instance with the logical cell coordinates in its X and Y members.
Description
MouseToLogCell is a
TPoint function used to convert
physical mouse coordinates, represented using the X and Y members in
Mouse, to logical cell coordinates for the grid control. Logical
cell coordinates are relative to the origin cell displayed as the upper-left
non-fixed cell on the grid control.
MouseToGridZone is used to determine where the mouse coordinates are located on the grid control. When the mouse coordinates are located in the non-fixed cells (grid zone is gzNormal), the value from MouseToCell is used as the return value.
For grid zones (like gzFixedRows, gzFixedCols, or gzFixedCells), the cell coordinates in the return value are changed to the last fixed column and/or row number(s) as needed. If the mouse coordinates are in one of several fixed columns or rows, the last column or row is always used in the return value.
MouseToLogCell is used in the MouseMove method when the active cell selection has been changed using the mouse.
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
