PowerTools SPREAD for Windows Forms 8.0J
ShowSubtitle プロパティ


サブタイトルを印刷するかどうかを取得または設定します。
構文
'Declaration
 
Public Property ShowSubtitle As PrintTitle
'使用法
 
Dim instance As PrintInfo
Dim value As PrintTitle
 
instance.ShowSubtitle = value
 
value = instance.ShowSubtitle
public PrintTitle ShowSubtitle {get; set;}
次のサンプルコードは、タイトルとサブタイトルを印刷します。
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
参照

PrintInfo クラス
PrintInfo メンバ

 

 


© 2004-2015, GrapeCity inc. All rights reserved.