PowerTools SPREAD for Windows Forms 8.0J
Opacity プロパティ (PrintInfo)


シートの印刷時に使用する不透明度を取得または設定します。
構文
'Declaration
 
Public Property Opacity As Integer
'使用法
 
Dim instance As PrintInfo
Dim value As Integer
 
instance.Opacity = value
 
value = instance.Opacity
public int Opacity {get; set;}

プロパティ値

不透明度(0〜255)を表す Integer
解説
このプロパティは、ColorオブジェクトのAlpha値を指定します。これは0〜255の値で、透明度の反対を示します。0を指定すると完全に透明になり、255を指定すると完全に不透明(真っ黒)になります。
次のサンプルコードは、印刷ページのレイアウトをカスタマイズするための設定を定義する方法を示します。
// Define the printer settings
FarPoint.Win.Spread.PrintInfo printset = new FarPoint.Win.Spread.PrintInfo();
FarPoint.Win.Spread.PrintMargin printmar = new FarPoint.Win.Spread.PrintMargin();

printmar.Left = 10;
printmar.Right = 10;
printmar.Top = 20;
printmar.Bottom = 40;

printset.Centering = FarPoint.Win.Spread.Centering.Both;
printset.FirstPageNumber = 1;
printset.Margin = printmar;
printset.Opacity = 60;
printset.Orientation = FarPoint.Win.Spread.PrintOrientation.Portrait;
printset.ShowBorder = false;
printset.ShowColor = false;
printset.ShowColumnHeader = FarPoint.Win.Spread.PrintHeader.Hide;
printset.ShowRowHeader = FarPoint.Win.Spread.PrintHeader.Hide;
printset.ShowGrid = true;
printset.ShowShadows = false;
printset.ZoomFactor = 2;

// Assign the printer settings to the sheet and print it
printset.PrintToPdf = true;
printset.PdfFileName = "C:\\results.pdf";
fpSpread1.Sheets[0].PrintInfo = printset;
fpSpread1.PrintSheet(0);
' Define the printer settings
Dim printset As New FarPoint.Win.Spread.PrintInfo()
Dim printmar As New FarPoint.Win.Spread.PrintMargin

printmar.Left = 10
printmar.Right = 10
printmar.Top = 20
printmar.Bottom = 40

printset.Centering = FarPoint.Win.Spread.Centering.Both
printset.FirstPageNumber = 1
printset.Margin = printmar
printset.Opacity = 60
printset.Orientation = FarPoint.Win.Spread.PrintOrientation.Portrait
printset.ShowBorder = False
printset.ShowColor = False
printset.ShowColumnHeader = FarPoint.Win.Spread.PrintHeader.Hide
printset.ShowRowHeader = FarPoint.Win.Spread.PrintHeader.Hide
printset.ShowGrid = True
printset.ShowShadows = False
printset.ZoomFactor = 2

' Assign the printer settings to the sheet and print it
printset.PrintToPdf = True
printset.PdfFileName = "C:\results.pdf"
FpSpread1.Sheets(0).PrintInfo = printset
FpSpread1.PrintSheet(0)
参照

PrintInfo クラス
PrintInfo メンバ

開発者ガイド

印刷ページのレイアウトのカスタマイズ

 

 


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