PowerTools SPREAD for Windows Forms 8.0J
Row プロパティ (ViewportHitTestInformation)


位置が指すビューポート内の行を取得します。
構文
'Declaration
 
Public ReadOnly Property Row As Integer
'使用法
 
Dim instance As ViewportHitTestInformation
Dim value As Integer
 
value = instance.Row
public int Row {get;}

プロパティ値

行インデックスを表す Integer
次のサンプル コードは、カーソルがビューポート行の上にあるかどうかを返します。
private void fpSpread1CellClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e)
{
      FarPoint.Win.Spread.HitTestInformation hti;
      FarPoint.Win.Spread.ViewportHitTestInformation vi;
      hti = fpSpread1.HitTest(e.X, e.Y);
      vi = hti.ViewportInfo;
      if (hti.Type == HitTestType.Viewport)
      {
            MessageBox.Show(vi.Row.ToString());
      }   
}
Private Sub FpSpread1CellClick(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.CellClickEventArgs)
      Dim hti As FarPoint.Win.Spread.HitTestInformation
      Dim vi As New FarPoint.Win.Spread.ViewportHitTestInformation
      hti = FpSpread1.HitTest(e.X, e.Y)
      vi = hti.ViewportInfo
      If hti.Type = HitTestType.Viewport Then
            MessageBox.Show(vi.Row)
      End If
End Sub
参照

ViewportHitTestInformation クラス
ViewportHitTestInformation メンバ

 

 


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