Spread Windows Forms 7.0 Product Documentation
Preview Property
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > PrintInfo Class : Preview Property


Glossary Item Box

Gets or sets whether to preview the sheet instead of printing.

Syntax

Visual Basic (Declaration) 
Public Property Preview As Boolean
Visual Basic (Usage)Copy Code
Dim instance As PrintInfo
Dim value As Boolean
 
instance.Preview = value
 
value = instance.Preview
C# 
public bool Preview {get; set;}

Property Value

Boolean: true to send the print job to a print preview window; false to send directly to a printer

Remarks

Set this property to true if you want to send the print job to a print preview window instead of to a printer.

Example

This example shows how to define the settings for displaying dialogs for the end users.
C#Copy Code
// Define the printer settings
FarPoint.Win.Spread.PrintInfo printset = new FarPoint.Win.Spread.PrintInfo();
printset.ShowPrintDialog = true;
printset.AbortMessage = "Do you want to cancel the printing?";
printset.Preview = true;

// Assign the printer settings to the sheet and print it
fpSpread1.Sheets[0].PrintInfo = printset;
fpSpread1.PrintSheet(0);
Visual BasicCopy Code
' Define the printer settings
Dim printset As New FarPoint.Win.Spread.PrintInfo()
printset.ShowPrintDialog = True
printset.AbortMessage = "Do you want to cancel the printing?"
printset.Preview = True

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

Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

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