Spread for ASP.NET 11 Product Documentation
LandscapeRule Constructor(ResetOption)
Example 


FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > LandscapeRule Class > LandscapeRule Constructor : LandscapeRule Constructor(ResetOption)
Whether to reset the rules or a particular rule
Creates a new rule that determines whether to print in landscape format, with the specified reset option.
Syntax
'Declaration
 
Public Function New( _
   ByVal resetOption As ResetOption _
)
'Usage
 
Dim resetOption As ResetOption
 
Dim instance As New LandscapeRule(resetOption)
public LandscapeRule( 
   ResetOption resetOption
)

Parameters

resetOption
Whether to reset the rules or a particular rule
Example
This example sets printing rules.
FarPoint.Web.Spread.SmartPrintRulesCollection rules = new FarPoint.Web.Spread.SmartPrintRulesCollection();
FarPoint.Web.Spread.PrintInfo pi = new FarPoint.Web.Spread.PrintInfo();
FarPoint.Web.Spread.LandscapeRule lr = new FarPoint.Web.Spread.LandscapeRule(FarPoint.Web.Spread.ResetOption.All);
FarPoint.Web.Spread.ScaleRule sr = new FarPoint.Web.Spread.ScaleRule();
FarPoint.Web.Spread.BestFitColumnRule bfcr = new FarPoint.Web.Spread.BestFitColumnRule();
lr.ResetOption = FarPoint.Web.Spread.ResetOption.None;
sr.ResetOption = FarPoint.Web.Spread.ResetOption.None;
sr.StartFactor = 1;
sr.EndFactor = 2;
sr.Interval = 0.5f;
bfcr.ResetOption = FarPoint.Web.Spread.ResetOption.None;
rules.Add(lr);
rules.Add(sr);
rules.Add(bfcr);
pi.SmartPrintRules = rules;
FpSpread1.ActiveSheetView.PrintInfo = pi;
Dim rules As New FarPoint.Web.Spread.SmartPrintRulesCollection
Dim pi As New FarPoint.Web.Spread.PrintInfo
Dim lr As New FarPoint.Web.Spread.LandscapeRule(FarPoint.Web.Spread.ResetOption.All)
Dim sr As New FarPoint.Web.Spread.ScaleRule
Dim bfcr As New FarPoint.Web.Spread.BestFitColumnRule
lr.ResetOption = FarPoint.Web.Spread.ResetOption.None
sr.ResetOption = FarPoint.Web.Spread.ResetOption.None
sr.StartFactor = 1
sr.EndFactor = 2
sr.Interval = 0.5
bfcr.ResetOption = FarPoint.Web.Spread.ResetOption.None
rules.Add(lr)
rules.Add(sr)
rules.Add(bfcr)
pi.SmartPrintRules = rules
FpSpread1.ActiveSheetView.PrintInfo = pi
See Also

Reference

LandscapeRule Class
LandscapeRule Members
Overload List