PowerTools SPREAD for Windows Forms 10.0J
HitTest(Int32,Int32) メソッド


x値
y値
特定の位置に関する情報を返します。
構文
'Declaration
 
Public Function HitTest( _
   ByVal x As Integer, _
   ByVal y As Integer _
) As HitTestInformation
'使用法
 
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
)

パラメータ

x
x値
y
y値
次のサンプルコードは、クリックされたセルの概略位置を返します。
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
参照

SpreadView クラス
SpreadView メンバ
ecc8a9ee-052c-4497-a50d-e9497af9642f
6f63fc22-2dc2-42ef-810b-98251e538d1a

 

 


© 2004-2017, GrapeCity inc. All rights reserved.