X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..5eae641dd681ecc837205ee84560b1cc89baf91f:/wxPython/demo/PrintFramework.py?ds=sidebyside

diff --git a/wxPython/demo/PrintFramework.py b/wxPython/demo/PrintFramework.py
index 6b77eb1f2b..36c3ea5a2b 100644
--- a/wxPython/demo/PrintFramework.py
+++ b/wxPython/demo/PrintFramework.py
@@ -31,18 +31,18 @@ class MyPrintout(wxPrintout):
         self.base_OnPreparePrinting()
 
     def HasPage(self, page):
-        self.log.WriteText("wxPrintout.HasPage\n")
-        if page == 1:
-            return true
+        self.log.WriteText("wxPrintout.HasPage: %d\n" % page)
+        if page <= 2:
+            return True
         else:
-            return false
+            return False
 
     def GetPageInfo(self):
         self.log.WriteText("wxPrintout.GetPageInfo\n")
-        return (1, 1, 1, 1)
+        return (1, 2, 1, 2)
 
     def OnPrintPage(self, page):
-        self.log.WriteText("wxPrintout.OnPrintPage\n")
+        self.log.WriteText("wxPrintout.OnPrintPage: %d\n" % page)
         dc = self.GetDC()
 
         #-------------------------------------------
@@ -80,7 +80,9 @@ class MyPrintout(wxPrintout):
         #-------------------------------------------
 
         self.canvas.DoDrawing(dc)
-        return true
+        dc.DrawText("Page: %d" % page, marginX/2, maxY-marginY)
+
+        return True
 
 
 #----------------------------------------------------------------------
@@ -115,14 +117,14 @@ class TestPrintPanel(wxPanel):
 
         self.box.Add(subbox, 0, wxGROW)
 
-        self.SetAutoLayout(true)
+        self.SetAutoLayout(True)
         self.SetSizer(self.box)
 
 
     def OnPrintSetup(self, event):
         printerDialog = wxPrintDialog(self)
         printerDialog.GetPrintDialogData().SetPrintData(self.printData)
-        printerDialog.GetPrintDialogData().SetSetupDialog(true)
+        printerDialog.GetPrintDialogData().SetSetupDialog(True)
         printerDialog.ShowModal();
         self.printData = printerDialog.GetPrintDialogData().GetPrintData()
         printerDialog.Destroy()
@@ -142,7 +144,7 @@ class TestPrintPanel(wxPanel):
         frame.Initialize()
         frame.SetPosition(self.frame.GetPosition())
         frame.SetSize(self.frame.GetSize())
-        frame.Show(true)
+        frame.Show(True)