]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/demo/PrintDialog.py
Updated version number
[wxWidgets.git] / wxPython / demo / PrintDialog.py
... / ...
CommitLineData
1
2import wx
3#---------------------------------------------------------------------------
4
5def runTest(frame, nb, log):
6 data = wx.PrintDialogData()
7
8 data.EnableSelection(True)
9 data.EnablePrintToFile(True)
10 data.EnablePageNumbers(True)
11 data.SetMinPage(1)
12 data.SetMaxPage(5)
13 data.SetAllPages(True)
14
15 dlg = wx.PrintDialog(frame, data)
16
17 if dlg.ShowModal() == wx.ID_OK:
18 data = dlg.GetPrintDialogData()
19 log.WriteText('GetAllPages: %d\n' % data.GetAllPages())
20
21 dlg.Destroy()
22
23#---------------------------------------------------------------------------
24
25
26overview = """\
27This class represents the print and print setup common dialogs. You may obtain
28a wx.PrinterDC device context from a successfully dismissed print dialog.
29
30User information is stored in a wx.PrintDialogData object that is passed to the
31dialog at creation time, and it is filled in by the user. As with other dialogs,
32do not use this data once the dialog is dismissed, and do not destroy the dialog
33until you have everything you need from it.
34
35"""
36
37
38if __name__ == '__main__':
39 import sys,os
40 import run
41 run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])