HtmlEasyPrinting.PreviewFile as panel instead of a new frame?

Hi,

I want to use the PreviewFile() frame inside of my own frame (in a notebook). Waht I’ve seen from some code samples (http://wiki.wxpython.org/index.cgi/Printing
) it is based on wxPreviewFrame, which does not offer such an option. Would it be possible to create an own class basing on wxPreviewFrame, which returns a panel instead of initializing an own frame and then use it again in an another selfmade class basing on HtmlEasyPrinting to replace PreviewFile with an own method using the “PreviewPanel”?

Or did I just show that I haven’t understood wxPython yet and there’s an much easier way? :stuck_out_tongue:

Happy New Year,
Michael

PS: Even if my thoughts would be correct, I do not really know how I should start. :frowning:

Michael Knopf wrote:

Hi,

I want to use the PreviewFile() frame inside of my own frame (in a notebook). Waht I've seen from some code samples (http://wiki.wxpython.org/index.cgi/Printing) it is based on wxPreviewFrame, which does not offer such an option. Would it be possible to create an own class basing on wxPreviewFrame, which returns a panel instead of initializing an own frame and then use it again in an another selfmade class basing on HtmlEasyPrinting to replace PreviewFile with an own method using the "PreviewPanel"?

Or did I just show that I haven't understood wxPython yet and there's an much easier way? :stuck_out_tongue:

I don't know if this will work or not, but the wx.PreviewFrame is made up of the wx.PreviewCanvas and wx.PreviewControlBar, so you may be able to use them individually. What I don't know however is if they depend on being parented by the wx.PreviewFrame or not.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!