Spread Windows Forms 6.0 Product Documentation
SmartPaperRule Constructor()
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SmartPaperRule Class > SmartPaperRule Constructor : SmartPaperRule Constructor()


Glossary Item Box

Create a smart paper rule with no reset option.

Syntax

Visual Basic (Declaration) 
Public Function New()
Visual Basic (Usage)Copy Code
Dim instance As New SmartPaperRule()
C# 
public SmartPaperRule()

Example

This example shows how to use the smart paper rule.
C#Copy Code
for (int i = 0; i <= 200; i++)
fpSpread1.ActiveSheet.Cells[1, i].Text = "Test";
PrintInfo pt = new PrintInfo();
SmartPrintRulesCollection ptRules = new SmartPrintRulesCollection();
ptRules.Add(new SmartPaperRule());            
pt.SmartPrintRules = ptRules;
pt.UseSmartPrint = true;            
pt.PrintToPdf = true;
pt.PdfFileName = "C:\\SmartPaperRule.pdf";
fpSpread1.ActiveSheet.PrintInfo = pt;
fpSpread1.PrintSheet(0);
Visual BasicCopy Code
Dim i As Integer
For i = 0 To 200
   fpSpread1.ActiveSheet.Cells(1, i).Text = "Test"
Next i
Dim pt As New PrintInfo()
Dim ptRules As New SmartPrintRulesCollection()
ptRules.Add(New SmartPaperRule())
pt.SmartPrintRules = ptRules
pt.UseSmartPrint = True
pt.PrintToPdf = True
pt.PdfFileName = "C:\SmartPaperRule.pdf"
fpSpread1.ActiveSheet.PrintInfo = pt
fpSpread1.PrintSheet(0)

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.