dc = wx.PaintDC(self)
w,h = dc.GetTextExtent(self.text)
dc.Clear()
- dc.DrawText(self.text, ((sz.width-w)/2, (sz.height-h)/2))
+ dc.DrawText(self.text, (sz.width-w)/2, (sz.height-h)/2)
def OnSize(self, evt):
self.Refresh()
self.sizer = sizerFunc(p)
self.CreateStatusBar()
self.SetStatusText("Resize this frame to see how the sizers respond...")
- self.sizer.Fit(p)
p.SetSizer(self.sizer)
+ self.sizer.Fit(p)
self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
self.Fit()