Author: johannes
Date: 2007-04-26 08:22:45 -0500 (Thu, 26 Apr 2007)
New Revision: 9529

Modified:
   trunk/gnue-forms/src/uidrivers/wx26/widgets/form.py
Log:
PrintOut on wxMSW does not contain the ToolBar now


Modified: trunk/gnue-forms/src/uidrivers/wx26/widgets/form.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx26/widgets/form.py 2007-04-26 12:55:34 UTC 
(rev 9528)
+++ trunk/gnue-forms/src/uidrivers/wx26/widgets/form.py 2007-04-26 13:22:45 UTC 
(rev 9529)
@@ -574,10 +574,14 @@
         # DC.
         window_dc = wx.ClientDC(self.main_window)
         w, h = self.main_window.GetClientSizeTuple()
+        # We have to take the different origin of the client area into account.
+        # On wxMSW the ClientDC contains the ToolBar.
+        (offsx, offsy) = self.main_window.GetClientAreaOrigin()
+
         bitmap = wx.EmptyBitmap(w, h)
         form_dc = wx.MemoryDC()
         form_dc.SelectObject(bitmap)
-        form_dc.Blit(0,0, w, h, window_dc, 0, 0)
+        form_dc.Blit(0,0, w, h, window_dc, 0, offsy)
 
         printout = _Printout(title, subtitle, user, bitmap)
         wx.Printer().Print(self.main_window, printout)



_______________________________________________
commit-gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnue

Reply via email to