Spread Windows Forms 9.0 Product Documentation
InSubtitle Property
Example 


Gets whether the location refers to the subtitle area.
Syntax
'Declaration
 
Public ReadOnly Property InSubtitle As Boolean
'Usage
 
Dim instance As TitlebarHitTestInformation
Dim value As Boolean
 
value = instance.InSubtitle
public bool InSubtitle {get;}
Example
This example gets hit test information.
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
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

TitlebarHitTestInformation Class
TitlebarHitTestInformation Members

 

 


Copyright © GrapeCity, inc. All rights reserved.