Spread Windows Forms 11.0 Product Documentation
ShowTitle Property
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > PrintInfo Class : ShowTitle Property
Gets or sets whether to print the title.
Syntax
'Declaration
 
Public Property ShowTitle As PrintTitle
'Usage
 
Dim instance As PrintInfo
Dim value As PrintTitle
 
instance.ShowTitle = value
 
value = instance.ShowTitle
public PrintTitle ShowTitle {get; set;}
Example
This example prints a title and subtitle.
private void Form1_Load(object sender, EventArgs e)
{
    // Show the title for the entire spreadsheet component.
    fpSpread1.TitleInfo.Visible = true;
    fpSpread1.TitleInfo.Text = "FarPoint 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";
    fpSpread1.Sheets[0].TitleInfo.HorizontalAlign = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
    fpSpread1.Sheets[0].TitleInfo.BackColor = System.Drawing.Color.Aqua;
}

private void button1_Click(object sender, EventArgs e)
{
    // Define the printer settings
    FarPoint.Win.Spread.PrintInfo printset = new FarPoint.Win.Spread.PrintInfo();
    printset.Header = "Print Job For /nFPT Inc.";
    printset.Footer = "This is Page /p/nof /pc Pages";
    printset.ShowSubtitle = FarPoint.Win.Spread.PrintTitle.Show;
    printset.ShowTitle = FarPoint.Win.Spread.PrintTitle.Show;
    printset.ShowColor = true;    
    // Assign the printer settings to the sheet and print to PDF
    printset.PrintToPdf = true;
    printset.PdfFileName = "C:\\results.pdf";
    fpSpread1.Sheets[0].PrintInfo = printset;
    fpSpread1.PrintSheet(0);
}
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
' Define the printer settings
Dim printset As New FarPoint.Win.Spread.PrintInfo()
printset.Header = "Print Job For /nFPT Inc."
printset.Footer = "This is Page /p/nof /pc Pages"
printset.ShowSubtitle = FarPoint.Win.Spread.PrintTitle.Show
printset.ShowTitle = FarPoint.Win.Spread.PrintTitle.Show
printset.ShowColor = True
' Assign the printer settings to the sheet and print to PDF
printset.PrintToPdf = True
printset.PdfFileName = "C:\results.pdf"
fpSpread1.Sheets(0).PrintInfo = printset
fpSpread1.PrintSheet(0)
End Sub

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
' Show the title for the entire spreadsheet component.
fpSpread1.TitleInfo.Visible = True
fpSpread1.TitleInfo.Text = "FarPoint 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"
fpSpread1.Sheets(0).TitleInfo.HorizontalAlign = FarPoint.Win.Spread.CellHorizontalAlignment.Center
fpSpread1.Sheets(0).TitleInfo.BackColor = System.Drawing.Color.Aqua
End Sub
See Also

Reference

PrintInfo Class
PrintInfo Members