Spread Windows Forms 11.0 Product Documentation
PrintTitle Enumeration
Example Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace : PrintTitle Enumeration
Specifies whether the title is printed.
Syntax
'Declaration
 
Public Enum PrintTitle 
   Inherits System.Enum
'Usage
 
Dim instance As PrintTitle
public enum PrintTitle : System.Enum 
Members
MemberDescription
HideHides the title in the printed sheet.
InheritInherits the setting from SheetView class.
ShowShows the title in the printed sheet.
Example
This example uses the PrintTitle enumeration.
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
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         FarPoint.Win.Spread.PrintTitle

See Also

Reference

FarPoint.Win.Spread Namespace