TCustomGrid.MouseToGridZone function
Converts the specified mouse coordinates to the grid zone where the coordinates are located.
Declaration
function MouseToGridZone(X: Integer; Y: Integer): TGridZoneArguments
X | Horizontal screen coordinate for the mouse pointer. |
Y | Vertical screen coordinate for the mouse pointer. |
Function result
Grid zone where the specified mouse pointer coordinates are located.
Description
MouseToGridZone is a
TGridZone function
which returns the grid zone where the specified mouse pointer coordinates are
located. The
X and
Y arguments contain the screen
coordinates where the mouse pointer is located.
The return value is a TGridZone enumeration value determined by
comparing the screen coordinates to the cached sizes and offsets for the grid
control. The screen coordinates are converted to cell coordinates when
available, and used to the determine the return value.
- gzInvalid
- X and Y are located on the border or in a area not used for cells in the client area for the control. Used when AllowOutboundEvents has been disabled on the control.
- gzFixedCells
- X and Y are both located in a fixed header cell (located in column 0 row 0 - or a cell where both the row and column are fixed).
- gzFixedRows
- X and Y are located in a fixed header cell located in a fixed row on the control.
- gzFixedCols
- X and Y are located in a fixed header cell located in a fixed column on the control.
- gzNormal
- X and Y are located in a non-fixed cell in the display area for the control.
MouseToGridZone is called during execution of the MouseMove method. It occurs after the OnMouseMove event handler has been signalled (when assigned), and before cached grid data (in GCache) are updated for the mouse movement.
Use CellToGridZone to get the grid zone for a cell at a specific column and row number.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
