PrinterSetup.ShowPageSetupDialog

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!
Method

PrinterSetup.ShowPageSetupDialog(Optional window as DesktopWindow) As Boolean

New in 2021r3

Supported for all project types and targets.

Displays the standard Page Setup dialog box.


Method

PrinterSetup.ShowPageSetupDialog(Optional window as Window) As Boolean

New in 2019r2

Supported for all project types and targets.

Displays the standard Page Setup dialog box.

Notes

If the SetupString property has been populated before this method is called, the Page Setup dialog box will reflect the settings stored in the SetupString property. After the user clicks the OK button to close the Page Setup dialog box, all of the PrinterSetup properties will be updated to reflect the settings the user chose.

On a macOS, PageSetupDialog takes an optional parameter, window. If specified, the Page Setup dialog will appear as a sheet connected to that window.

Returns a Boolean. This function returns True if the User clicks OK and False if the user clicks Cancel.

Examples

This example displays the Page Setup dialog box and then stores the settings the user chose in a variable:

Var printerSettings As String
Var printer As New PrinterSetup
If printer.ShowPageSetupDialog Then
printerSettings = printer.SetupString
End If