ActiveReports Developer 7
FitToPage Property
See Also  Example
GrapeCity.ActiveReports.Export.Excel.v7 Assembly > GrapeCity.SpreadBuilder.Printing Namespace > PageSetup Class : FitToPage Property

Glossary Item Box

Returns a value indicating whether the FitToPage option is selected in the page setup dialog.

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property FitToPage As System.Boolean
C# 
public System.bool FitToPage {get;}

Property Value

Boolean.  The default value is False.

Remarks

If FitToPagesWide or FitToPagesTall was set since the last Zoom, this property will return True to indicate that the FitToPage option in the Page Setup dialog is selected. If Zoom was set since FitToPagesWide or FitToPagesTall (or none of these properties were set at all) this property returns False, indicating that the zoom/percentage scaling option is selected.

Example

C#Copy Code
sb.Sheets[0].PageSetup.FitToPagesTall = 2;
sb.Sheets[0].PageSetup.FitToPagesWide = 2;

if (sb.Sheets[0].PageSetup.FitToPage == true)
{
    MessageBox.Show("FitToPage");
}
Visual BasicCopy Code
sb.Sheets(0).PageSetup.FitToPagesTall = 2
sb.Sheets(0).PageSetup.FitToPagesWide = 2

If sb.Sheets(0).PageSetup.FitToPage = True Then
    MsgBox("FitToPage")
End If

See Also