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


データを含む行だけを印刷するかどうかを取得または設定します。
構文
'Declaration
 
Public Property UseMax As Boolean
'使用法
 
Dim instance As PrintInfo
Dim value As Boolean
 
instance.UseMax = value
 
value = instance.UseMax
public bool UseMax {get; set;}

プロパティ値

Boolean:行および列をデータが含まれる最大限度まで印刷する場合は True、最大限度を無視する場合は False
解説

このプロパティを True に設定すると、多くの場合、時間と用紙が節約されます。このプロパティが True に設定されている場合、データを含む列および行の後に空のセルが続いているときに、それらのセルは印刷されません。このプロパティが False に設定されている場合、何が印刷されるかは、PrintType プロパティの設定によって決まります。

このプロパティは PrintType プロパティをオーバーライドできます。たとえば、行 0 〜 100 の列 0 〜 10 を印刷するよう設定していて、データが行 0 〜 50 の列 0 〜 5 にしか存在しない場合、UseMax プロパティを True に設定していれば、行 0 〜 50 の列 0 〜 5 のみが印刷されます。

次のサンプルコードは、シートの一部のみを印刷するよう指定する方法を示します。
// Typically, not all of these settings are used together but are included here for illustration purposes

// Create the printer settings object
FarPoint.Win.Spread.PrintInfo printset = new FarPoint.Win.Spread.PrintInfo(); 

// Allow printing of only 20 columns and 20 rows of cells
printset.ColStart = 1;
printset.ColEnd = 20;
printset.RowStart = 1;
printset.RowEnd = 20;
printset.PrintType = FarPoint.Win.Spread.PrintType.CellRange;

// Allow printing of only five pages
printset.PageStart = 1;
printset.PageEnd = 5;

// Allow printing of the cell notes together at the end
printset.PrintNotes = FarPoint.Win.Spread.PrintNotes.AtEnd;

// Allow printing of the shapes
printset.PrintShapes = true;

// Allow printing of only rows and columns up to the last ones with data 
printset.UseMax = True;

// Assign the printer settings to the sheet and print it
fpSpread1.Sheets[0].PrintInfo = printset; 
fpSpread1.PrintSheet(0);
' Typically, not all of these settings are used together but are included here for illustration purposes

' Create the printer settings object
Dim printset As New FarPoint.Win.Spread.PrintInfo

' Allow printing of only 20 columns and 20 rows of cells
printset.ColEnd = 20
printset.ColStart = 1
printset.RowStart = 1
printset.RowEnd = 20
printset.PrintType = FarPoint.Win.Spread.PrintType.CellRange

' Allow printing of only five pages
printset.PageStart = 1
printset.PageEnd = 5

' Allow printing of the cell notes together at the end
printset.PrintNotes = FarPoint.Win.Spread.PrintNotes.AtEnd

' Allow printing of the shapes
printset.PrintShapes = True

' Allow printing of only rows and columns up to the last ones with data 
printset.UseMax = true

' Assign the printer settings to the sheet and print it
FpSpread1.Sheets(0).PrintInfo = printset
FpSpread1.PrintSheet(0)
参照

PrintInfo クラス
PrintInfo メンバ
PrintType プロパティ

開発者ガイド

印刷内容の指定
データの入力された部分だけの印刷

 

 


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