Step Create preview frame

Once you have your wx.PrintPreview, you need the frame in which to view it. This is provided by the class wx.PreviewFrame, which is a subclass of wx.Frame providing the basic user interaction widgets for the preview. The constructor for wx.PreviewFrame allows you to pass it your wx.PrintPreview instance.

wx.PreviewFrame(preview, parent, title, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE, name="frame")

The only really interesting parameter here is preview, which takes the wx.Print-Preview instance to be previewed. Everything else is standard wx.Frame boilerplate. The wx.PreviewFrame does not define any custom styles or events.

Was this article helpful?

0 0

Post a comment