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