ListBar.HitTest
- Updated2025-04-09
- 1 minute(s) read
ListBar.HitTest
Syntax
ListBar.HitTest( x, y)
Return Value
Returns the index of an item on the current page. When no item exists at the specified location, this method returns -1 .
Purpose
Returns which item, if any, is at the specified location.
Remarks
Use this method to determine which item the given coordinates belong to. For example, when a user clicks a control, you might want to determine which item on the current page the user clicked.
Parameters
x As Long
[In] Specifies the x-coordinate of the location to test, in pixels, relative to the control.
y As Long
[In] Specifies the y-coordinate of the location to test, in pixels, relative to the control.