]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/wxPrintDialog.py
Updated to current API.
[wxWidgets.git] / wxPython / demo / wxPrintDialog.py
index 183cbe801cac5ba3eda06bff8f8acf8663069ba1..b70e484dd5811f627c6b08b70a09e9603e571cc9 100644 (file)
@@ -5,12 +5,18 @@ from wxPython.wx import *
 
 def runTest(frame, nb, log):
     data = wxPrintDialogData()
+
+    data.EnableSelection(True)
     data.EnablePrintToFile(True)
     data.EnablePageNumbers(True)
-    data.EnableSelection(True)
+    data.SetMinPage(1)
+    data.SetMaxPage(5)
+    data.SetAllPages(True)
+
     dlg = wxPrintDialog(frame, data)
     if dlg.ShowModal() == wxID_OK:
-        log.WriteText('\n')
+        data = dlg.GetPrintDialogData()
+        log.WriteText('GetAllPages: %d\n' % data.GetAllPages())
     dlg.Destroy()
 
 #---------------------------------------------------------------------------
@@ -18,14 +24,12 @@ def runTest(frame, nb, log):
 
 
 
+overview = """\
+"""
 
 
 
-
-
-
-
-
-
-overview = """\
-"""
+if __name__ == '__main__':
+    import sys,os
+    import run
+    run.main(['', os.path.basename(sys.argv[0])])