Step Initialize the frame

Before you Show() your wx.PreviewFrame, you need to call the Initialize() method, which creates the internal pieces of the window and does other internal accounting. Once you Show() the frame, the buttons on the frame manage navigating through the preview and zooming and the like with no further intervention on your part. Should you want to intervene, you can look at the methods CreateControlBar() and CreateCanvas(), which create internal objects of the class wx.PreviewControlBar and wx.PreviewCanvas, respectively. Overriding those methods to create your own canvas and/or control bar objects, allows you to customize the look and feel of your print preview window.

Was this article helpful?

0 0

Post a comment