MESCIUS SPREAD for Windows Forms 15.0J
Sheet プロパティ (TabStripHitTestInformation)
使用例 

指定した位置が指すシートを返します。
構文
'宣言
 
Public ReadOnly Property Sheet As Integer
public int Sheet {get;}

プロパティ値

シート インデックスを表す Integer
使用例
次のサンプル コードは、シートの位置を返します。
void fpSpread1SheetTabClick(object sender, SheetTabClickEventArgs e)
{
      Rectangle r = fpSpread1.GetRootWorkbook().GetTabStripRectangle();
      FarPoint.Win.Spread.HitTestInformation hti;
      FarPoint.Win.Spread.TabStripHitTestInformation ti;
      hti = fpSpread1.HitTest(r.X, r.Y);
      ti = hti.TabStripInfo;
      if (hti.Type == HitTestType.TabStrip)
      {
            MessageBox.Show(ti.Sheet.ToString());
      }    
}
Private Sub FpSpread1SheetTabClick(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.SheetTabClickEventArgs)

      Dim r As Rectangle
      r = FpSpread1.GetRootWorkbook.GetTabStripRectangle()

      Dim hti As FarPoint.Win.Spread.HitTestInformation
      Dim ti As FarPoint.Win.Spread.TabStripHitTestInformation
      hti = FpSpread1.HitTest(r.X, r.Y)
      ti = hti.TabStripInfo
      If hti.Type = HitTestType.TabStrip Then
            MsgBox(ti.Sheet)
      End If
参照

TabStripHitTestInformation クラス
TabStripHitTestInformation メンバ

 

 


© MESCIUS inc. All rights reserved.