1. Technology

An Introduction to Programming wxPython

By

5 of 6

Showing wx.Frame

Next, we need to declare whether the instance of wx.Frame needs to be shown anew or whether it is already in position or otherwise should be hidden. For this we use the method Show from wx.Frame.

We then tell Python to set the window as the top level window, using the SetTopWindow method from the wx.App class. If the function executes as expected, we then return a value of '1'.

 frame.Show(True) 
 self.SetTopWindow(frame) 
 return 1 

©2014 About.com. All rights reserved.