Spread Windows Forms 12.0 Product Documentation
HitTest(Int32,Int32) Method
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SpreadView Class : HitTest(Int32,Int32) Method
The x value
The y value
Returns information about the given location.
Syntax
'Declaration
 
Public Function HitTest( _
   ByVal x As Integer, _
   ByVal y As Integer _
) As HitTestInformation
'Usage
 
Dim instance As SpreadView
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 value
y
The y value
Example
This example returns the general location of the clicked cell.
private void fpSpread1_CellClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e)
        {
            FarPoint.Win.Spread.SpreadView sv;
            sv = fpSpread1.GetRootWorkbook();
            FarPoint.Win.Spread.HitTestInformation hit;
            hit = sv.HitTest(e.X, e.Y);
            listBox1.Items.Add(hit.Type);
        }
Private Sub fpSpread1_CellClick(sender As Object, e As FarPoint.Win.Spread.CellClickEventArgs) Handles fpSpread1.CellClick
        Dim sv As FarPoint.Win.Spread.SpreadView
        sv = fpSpread1.GetRootWorkbook()
        Dim hit As FarPoint.Win.Spread.HitTestInformation
        hit = sv.HitTest(e.X, e.Y)
        ListBox1.Items.Add(hit.Type)
    End Sub
See Also

Reference

SpreadView Class
SpreadView Members
Locating the Pointer Using HitTest
Customizing Interaction Based on Events