Spread Windows Forms 10.0 Product Documentation
PrintTitle Enumeration
Example Example 


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

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

FarPoint.Win.Spread Namespace

 

 


Copyright © GrapeCity, inc. All rights reserved.