mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 03:20:08 +01:00
Trim Trailing Whitespace demos
This commit is contained in:
@@ -30,12 +30,12 @@ class MyCustomPanel(wx.Panel):
|
||||
# the Create step is done by XRC.
|
||||
self.Bind(wx.EVT_WINDOW_CREATE, self.OnCreate)
|
||||
self.Bind(wx.EVT_SIZE, self.OnSize)
|
||||
|
||||
|
||||
|
||||
|
||||
def OnCreate(self, evt):
|
||||
# This is the little bit of customization that we do for this
|
||||
# silly example. It could just as easily have been done in
|
||||
# the resource. We do it in the EVT_WINDOW_CREATE handler
|
||||
# the resource. We do it in the EVT_WINDOW_CREATE handler
|
||||
# because the window doesn't really exist yet in the __init__.
|
||||
if self is evt.GetEventObject():
|
||||
t = wx.StaticText(self, -1, "MyCustomPanel")
|
||||
@@ -54,7 +54,7 @@ class MyCustomPanel(wx.Panel):
|
||||
sz = self.GetSize()
|
||||
w, h = self.t.GetTextExtent(self.t.GetLabel())
|
||||
self.t.SetPosition(((sz.width-w)/2, (sz.height-h)/2))
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user