Spread Windows Forms 11.0 Product Documentation
HitTest Method (FpSpread)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > FpSpread Class : HitTest Method
The x-coordinate of the point
The y-coordinate of the point
Performs a hit test.
Syntax
'Declaration
 
Public Function HitTest( _
   ByVal x As Integer, _
   ByVal y As Integer _
) As HitTestInformation
'Usage
 
Dim instance As FpSpread
Dim x As Integer
Dim y As Integer
Dim value As HitTestInformation
 
value = instance.HitTest(x, y)
public HitTestInformation HitTest( 
   int x,
   int y
)

Parameters

x
The x-coordinate of the point
y
The y-coordinate of the point

Return Value

HitTestInformation object containing the relevant information about various locations on the spreadsheet
Example
This example uses the HitTest method.
private void fpSpread1_CellClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e)
        {
            FarPoint.Win.Spread.HitTestInformation hti = new FarPoint.Win.Spread.HitTestInformation();
            hti = fpSpread1.HitTest(e.X, e.Y);
            listBox1.Items.Add(hti.Type);
        }
Private Sub FpSpread1_CellClick(sender As Object, e As FarPoint.Win.Spread.CellClickEventArgs) Handles fpSpread1.CellClick
        Dim hti As FarPoint.Win.Spread.HitTestInformation
        hti = fpSpread1.HitTest(e.X, e.Y)
        ListBox1.Items.Add(hti.Type)
    End Sub
See Also

Reference

FpSpread Class
FpSpread Members

User-Task Documentation

Customizing Interaction Based on Events
Locating the Cursor Using HitTest