PowerTools SPREAD for Windows Forms 10.0J
BestFitRows プロパティ


印刷時に最も高さのある文字列に合わせて行の高さを調整するかどうかを表す値を取得または設定します。
構文
'Declaration
 
Public Property BestFitRows As Boolean
'使用法
 
Dim instance As PrintInfo
Dim value As Boolean
 
instance.BestFitRows = value
 
value = instance.BestFitRows
public bool BestFitRows {get; set;}

プロパティ値

Boolean:行の高さを自動的に調整する場合は True、それ以外の場合は False
解説

このプロパティは行の高さを設定します。最も幅の広い列に合わせて列のサイズを設定するには、BestFitColsプロパティを使用します。

次のサンプルコードは、印刷を最適化するための設定を定義する方法を示します。
// Typically you would use one type of optimization; they are all shown here for illustration only

// Define the printer settings for optimization
FarPoint.Win.Spread.PrintInfo printset = new FarPoint.Win.Spread.PrintInfo();
FarPoint.Win.Spread.SmartPrintRulesCollection prules = new FarPoint.Win.Spread.SmartPrintRulesCollection(); 

// ... use best fit of columns and rows
printset.BestFitCols = true;
printset.BestFitRows = true;

// ... or check by page size
printset.SmartPrintPagesTall = 1; 
printset.SmartPrintPagesWide = 1; 

// ... or use the rules defined
prules.Add(new FarPoint.Win.Spread.BestFitColumnRule(FarPoint.Win.Spread.ResetOption.None)); 
prules.Add(new FarPoint.Win.Spread.LandscapeRule(FarPoint.Win.Spread.ResetOption.Current)); 
prules.Add(new FarPoint.Win.Spread.ScaleRule(FarPoint.Win.Spread.ResetOption.None, 1, 0.6, 0.1)); 
printset.SmartPrintRules = prules;
printset.UseSmartPrint = true;

// Assign the printer settings to the sheet and print it
fpSpread1.Sheets[0].PrintInfo = printset;
fpSpread1.PrintSheet(0);
' Typically you would use one type of optimization; they are all shown here for illustration only

' Define the printer settings for optimization
Dim printset As New FarPoint.Win.Spread.PrintInfo()
Dim prules As New FarPoint.Win.Spread.SmartPrintRulesCollection

' ... use best fit of columns and rows
printset.BestFitCols = True
printset.BestFitRows = True

' ... or check by page size
printset.SmartPrintPagesTall = 1
printset.SmartPrintPagesWide = 1

' ... or use the rules defined
prules.Add(New FarPoint.Win.Spread.BestFitColumnRule(FarPoint.Win.Spread.ResetOption.None)) 
prules.Add(New FarPoint.Win.Spread.LandscapeRule(FarPoint.Win.Spread.ResetOption.Current))
prules.Add(New FarPoint.Win.Spread.ScaleRule(FarPoint.Win.Spread.ResetOption.None, 1, 0.6, 0.1))
printset.SmartPrintRules = prules
printset.UseSmartPrint = True

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

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

開発者ガイド

印刷の最適化

 

 


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