It's really strange that the code works now without calling PageSetup() and I didn't change anything ...
Thank you for your help, Robin.
Jenny
···
From: "Robin Dunn" <robin@alldunn.com>
Reply-To: wxpython-users@lists.wxwindows.org
To: <wxpython-users@lists.wxwindows.org>
Subject: Re: [wxPython] How to set margins in wxHtmlEasyPrinting?
Date: Tue, 17 Jul 2001 14:12:59 -0700>
> Now I understand that it will work when I call
> wxHtmlEasyPrinting.PageSetUp() and the user click OK. But why not have
> something like wxHtmlEasyPrinting.GetPrintData().SetPaperId() so I can set
> margins directly? Thank you.
>Changing the demo (in wxHtmlWindow.py) to be like this:
def OnPrint(self, event):
self.printer.GetPageSetupData().SetMarginTopLeft((100,100))
self.printer.PrintFile(self.html.GetOpenedPage())worked for me. The page printed with the margin and I didn't have to go
through the page setup dialog first.--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com