Or maybe you could post here a sample application which would it make it
more easy to help:
http://wiki.wxpython.org/index.cgi/MakingSampleAppsStani
I am going to try and put one up today. I have tried the linux wxPython demo
and if you use the 'More Window Controls/HtmlWindow' there is my problem.
If you chose 'print' then from printdialog chose 'Landscape' then chose
'Print Preview'. It changes the paper to Landscape but the actual contents
of the pages is still Portrait. This doesn't happen on the windows demo.
Windows changes the paper and content to Landscape and prints it that
way. Linux/GTK isn't. Only changes the paper.
But I have another problem right now. When I use htmleasyprinting I cannot
get the printdialog to use settings that I set. Right now the Demo works, so it
must be me. Cause I can modify the demo function:
def OnPrint(self, event):
self.printer.GetPrintData().SetPaperId(wx.PAPER_LETTER)
self.printer.GetPrintData().SetOrientation(wx.LANDSCAPE)
self.printer.GetPageSetupData().SetMarginTopLeft((10,10))
self.printer.GetPageSetupData().SetMarginBottomRight((10,10))
#linux
self.printer.PrintFile(self.html.GetOpenedPage())
and it works. Printdialog changes to Landscape. If click Print Preview,
well contents portrait and the margins on left are wrong. The preview
is off the page (shifted left). But it sorta works. In my app if I use
htmleasyprinting I can't seem to get the dialog to change.
But everything else works the same as above. So let me get some sample
code up and maybe you can help me get the dialog changing defaults.
You need a debug build of python, wxGTK, and wxPython, and you should
then be able to run it under gdb and step "around" the Python code.
Sadly, theres no debugger that can magically switch from debugging
Python code to the C/C++ code.That said, I doubt your problem is actually in wxWindow. Like Stani
said, try to recreate it in a sample application and post here.
Chris Mellon
It was a wxWindows bug at first and the print dialogs would not change
default settings. That has been fixed/partly fixed. There has been some more
fixes, but after the latest wxPython release. So I have to see if can get them
to compile or wait until the next wxPython release update. Right now like
mention above. It does seem now the Demo works partly. At least the
printdialog changes defaults. I just can't get it to work in my app. Will try
to get the demo up tonight.
Debugging wxWidgets From wxPython - wxPyWiki
--
Robin Dunn
Thank you Robin for the fish. I had compile wxGTK and wxPython debug.
But failed to do python. Will look into that and some of the other hints on
that page. Guess need to figure out why first my app will not change defaults
on printdialog and the demo is.
Thanks for the help guys!! Will try to get a sample today.
Dave