]> git.saurik.com Git - wxWidgets.git/blame - wxPython/demo/wxPrintDialog.py
Commented out WM_MOUSELEAVE until it can be fixed
[wxWidgets.git] / wxPython / demo / wxPrintDialog.py
CommitLineData
8fa876ca
RD
1# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
2#
3# o Updated for wx namespace
4#
cf694132 5
8fa876ca 6import wx
cf694132
RD
7#---------------------------------------------------------------------------
8
9def runTest(frame, nb, log):
8fa876ca 10 data = wx.PrintDialogData()
1fded56b
RD
11
12 data.EnableSelection(True)
1e4a197e
RD
13 data.EnablePrintToFile(True)
14 data.EnablePageNumbers(True)
1fded56b
RD
15 data.SetMinPage(1)
16 data.SetMaxPage(5)
17 data.SetAllPages(True)
18
8fa876ca
RD
19 dlg = wx.PrintDialog(frame, data)
20
21 if dlg.ShowModal() == wx.ID_OK:
1fded56b
RD
22 data = dlg.GetPrintDialogData()
23 log.WriteText('GetAllPages: %d\n' % data.GetAllPages())
8fa876ca 24
cf694132
RD
25 dlg.Destroy()
26
27#---------------------------------------------------------------------------
28
29
8fa876ca
RD
30overview = """\
31This class represents the print and print setup common dialogs. You may obtain
32a wxPrinterDC device context from a successfully dismissed print dialog.
cf694132 33
8fa876ca
RD
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.
cf694132 38
1fded56b 39"""
cf694132
RD
40
41
1fded56b
RD
42if __name__ == '__main__':
43 import sys,os
44 import run
45 run.main(['', os.path.basename(sys.argv[0])])