From 679da63bf8f587f3f7f203425ec929b2daa26623 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 12 Jul 2012 09:32:00 +0000 Subject: [PATCH] Just use Fit() instead of a fixed size, and center the frame just for grins. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72046 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/simple/simple.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/samples/simple/simple.py b/samples/simple/simple.py index 01ff2dc8..d0bdeace 100644 --- a/samples/simple/simple.py +++ b/samples/simple/simple.py @@ -13,8 +13,7 @@ class MyFrame(wx.Frame): and has a simple menu. """ def __init__(self, parent, title): - wx.Frame.__init__(self, parent, -1, title, - pos=(150, 150), size=(350, 250)) + wx.Frame.__init__(self, parent, -1, title) # Create the menubar menuBar = wx.MenuBar() @@ -41,7 +40,7 @@ class MyFrame(wx.Frame): panel = wx.Panel(self) # and a few controls - text = wx.StaticText(panel, -1, "Hello World!") + text = wx.StaticText(panel, -1, "Hello World! Welcome to wxPython.") text.SetFont(wx.Font(14, wx.SWISS, wx.NORMAL, wx.BOLD)) text.SetSize(text.GetBestSize()) btn = wx.Button(panel, -1, "Close") @@ -65,6 +64,8 @@ class MyFrame(wx.Frame): sizer = wx.BoxSizer() sizer.Add(panel, 1, wx.EXPAND) self.SetSizer(sizer) + self.Fit() + self.CenterOnScreen(wx.BOTH) def OnTimeToClose(self, evt):