Trim Trailing Whitespace demos

This commit is contained in:
Metallicow
2016-11-24 19:26:05 -06:00
parent 3d30023218
commit c273dfa9b1
90 changed files with 645 additions and 646 deletions

View File

@@ -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))
#----------------------------------------------------------------------