MESCIUS SPREAD for Windows Forms 17.0J
InTitle プロパティ

位置がタイトル領域を指すかどうかを取得します。
構文
'Declaration
 
Public ReadOnly Property InTitle As Boolean
public bool InTitle {get;}
次のサンプルコードは、ヒットテスト情報を取得します。
fpSpread1.TitleInfo.Visible = true;
fpSpread1.TitleInfo.Text = "Spread Title";
fpSpread1.TitleInfo.HorizontalAlign = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
// Show the subtitle for the individual sheet.
fpSpread1.Sheets[0].TitleInfo.Visible = true;
fpSpread1.Sheets[0].TitleInfo.Text = "Sheet Only Subtitle";

private void fpSpread1_MouseDown(object sender, MouseEventArgs e)
{          
    FarPoint.Win.Spread.TitlebarHitTestInformation tinfo;
    tinfo = new FarPoint.Win.Spread.TitlebarHitTestInformation();
    FarPoint.Win.Spread.HitTestInformation tb;
    tb = fpSpread1.HitTest(e.X, e.Y);
    tinfo = tb.TitleBarInfo;
    if (tb.Type == FarPoint.Win.Spread.HitTestType.TitleBar)
    {
        listBox1.Items.Add(tinfo.InTitle);
        listBox1.Items.Add(tinfo.InSubtitle);
    }
}
fpSpread1.TitleInfo.Visible = True
fpSpread1.TitleInfo.Text = "Spread Title"
fpSpread1.TitleInfo.HorizontalAlign = FarPoint.Win.Spread.CellHorizontalAlignment.Center
' Show the subtitle for the individual sheet.
fpSpread1.Sheets(0).TitleInfo.Visible = True
fpSpread1.Sheets(0).TitleInfo.Text = "Sheet Only Subtitle"
 
Private Sub fpSpread1_MouseDown(sender As Object, e As MouseEventArgs) Handles fpSpread1.MouseDown
Dim tinfo As FarPoint.Win.Spread.TitlebarHitTestInformation
tinfo = New FarPoint.Win.Spread.TitlebarHitTestInformation()
Dim tb As FarPoint.Win.Spread.HitTestInformation
tb = fpSpread1.HitTest(e.X, e.Y)
tinfo = tb.TitleBarInfo
If tb.Type = FarPoint.Win.Spread.HitTestType.TitleBar Then
ListBox1.Items.Add(tinfo.InTitle)
ListBox1.Items.Add(tinfo.InSubtitle)
End If
参照

TitlebarHitTestInformation クラス
TitlebarHitTestInformation メンバ

 

 


© MESCIUS inc. All rights reserved.