Unicode Controls & Classes for VB6 - Version 4

ctlUniGrid.GetColByX Function

Returns the column number relative to a certain X coordinate (the X coordinate without the HScroll_Value as obtained by the MouseMove, MouseDown and MouseUp events)

Syntax
Public Function GetColByX (ByVal x As Long) As Long
Parameters
Parameter Description
ByVal x As Long The x coordinate
Remarks
If the X coordinate passed to this method is not into any cell the result is -1&
Note: the "HScroll_Value" is automatically added to the X coordinate when you pass it to this method (so the X parameter refers only to the visible viewport).