X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/05a03b016a6fb93bdb81a25eac9fc4834fe6f95e..3eb1aad7ec1331a5331f03a1913156fdbed9fcc4:/wxPython/samples/simple/simple.py diff --git a/wxPython/samples/simple/simple.py b/wxPython/samples/simple/simple.py index 95df6d5073..ee27c45d71 100644 --- a/wxPython/samples/simple/simple.py +++ b/wxPython/samples/simple/simple.py @@ -13,7 +13,8 @@ class MyFrame(wx.Frame): and has a simple menu. """ def __init__(self, parent, title): - wx.Frame.__init__(self, parent, -1, title, size=(350, 200)) + wx.Frame.__init__(self, parent, -1, title, + pos=(150, 150), size=(350, 200)) # Create the menubar menuBar = wx.MenuBar() @@ -70,8 +71,13 @@ class MyFrame(wx.Frame): print "Having fun yet?" -app = wx.PySimpleApp() -frame = MyFrame(None, "Simple wxPython App") -frame.Show(True) +class MyApp(wx.App): + def OnInit(self): + frame = MyFrame(None, "Simple wxPython App") + frame.Show(True) + self.SetTopWindow(frame) + return True + +app = MyApp(True) app.MainLoop()