XYHitTest Method
Returns information for a Pen based on the specified coordinates. Typically used with the MouseUp and MouseDown events.
Syntax
object.XYHitTest lfX, lfY, pDt, pfV, pszPenName, ppPen, lPenNum, pbReal
Properties
The XYHitTest method syntax has these parts:
Part |
Description |
object |
An object expression that evaluates to an object in the Applies To list. |
x |
Double. The X coordinate where the mouse is clicked. |
y |
Double. The Y coordinate where the mouse is clicked. |
pDt |
Date. Returns the date for the Pen that corresponds to the specified X and Y coordinates. |
pfV |
Double. Returns the value for the Pen that corresponds to the specified X and Y coordinates. |
pszPenName |
String. Returns the name of the Pen that corresponds to the specified X and Y coordinates. |
ppPen |
Object. Returns the Pen object that corresponds to the specified X and Y coordinates. |
lPenNum |
Long. Returns the index in the Pens collection for the Pen that corresponds to the specified X and Y coordinates. |
pbReal |
Boolean. Returns True if the hit test was on a real point and False if it was on an interpolated point. |
Remarks
This method is useful for performing operations based on Pen selection, or for creating data annotations. It returns the time and date of the clicked point, the value on the line, the pen's data source, a pointer to the Pen, the pen number, and whether the user clicked on a real or interpolated data point.