[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Grids' (#lcl)

TCustomGrid.MouseToGridZone

Converts the specified coordinates for the mouse pointer to the grid zone where they are located.

Declaration

Source position: grids.pas line 1369

public function TCustomGrid.MouseToGridZone(

  X: Integer;

  Y: Integer

):TGridZone;

Arguments

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 used to get 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 determine 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.
gzFixedCells
X and Y are located in the fixed header cell (column 0) on the control.
gzFixedRows
X and Y are located in a fixed header cell for a row on the control.
gzFixedCols
X and Y are located in a fixed header cell for a column on the control.
gzNormal
X and Y are located in a non-fixed cell in the display area for the control.

See also

TGridZone

  

Enumerated type with values which represent the zones or areas on a grid control.


Version 3.2 Generated 2024-02-25 Home