MESCIUS SPREAD for Windows Forms 15.0J
PrintTitle 列挙体
使用例 使用例 

タイトルが印刷されるかどうかを指定します。
構文
'宣言
 
Public Enum PrintTitle 
   Inherits System.Enum
public enum PrintTitle : System.Enum 
メンバ
メンバ解説
Hideシートの印刷時にタイトルを非表示にします。
InheritSheetView クラスの設定を継承します。
Showシートの印刷時にタイトルを表示します。
使用例
次のサンプルコードは、PrintTitle列挙体を使用します。
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
継承階層

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

参照

FarPoint.Win.Spread 名前空間

 

 


© MESCIUS inc. All rights reserved.