X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2571247b80890796d1f26e181a8f955735031efc..6caa0f5cd18fe9fb39c207d5f31fa5633479a822:/wxPython/samples/doodle/superdoodle.py diff --git a/wxPython/samples/doodle/superdoodle.py b/wxPython/samples/doodle/superdoodle.py index 0e8024d632..f2f24fecb6 100644 --- a/wxPython/samples/doodle/superdoodle.py +++ b/wxPython/samples/doodle/superdoodle.py @@ -57,8 +57,7 @@ class DoodleFrame(wx.Frame): box.Add(self.doodle, 1, wx.EXPAND) # Tell the frame that it should layout itself in response to - # size events. - self.SetAutoLayout(True) + # size events using this sizer. self.SetSizer(box) @@ -181,7 +180,7 @@ class ControlPanel(wx.Panel): BMP_BORDER = 3 def __init__(self, parent, ID, doodle): - wx.Panel.__init__(self, parent, ID, style=wx.RAISED_BORDER) + wx.Panel.__init__(self, parent, ID, style=wx.RAISED_BORDER, size=(20,20)) numCols = 4 spacing = 4 @@ -295,7 +294,7 @@ class ColourIndicator(wx.Window): def __init__(self, parent): wx.Window.__init__(self, parent, -1, style=wx.SUNKEN_BORDER) self.SetBackgroundColour(wx.WHITE) - self.SetSize( (-1, 45) ) + self.SetSize( (45, 45) ) self.colour = self.thickness = None self.Bind(wx.EVT_PAINT, self.OnPaint) @@ -321,7 +320,7 @@ class ColourIndicator(wx.Window): pen = wx.Pen(self.colour, self.thickness) dc.BeginDrawing() dc.SetPen(pen) - dc.DrawLine((10, sz.height/2), (sz.width-10, sz.height/2)) + dc.DrawLine(10, sz.height/2, sz.width-10, sz.height/2) dc.EndDrawing() @@ -352,7 +351,7 @@ instructions:
SuperDoodle and wxPython are brought to you by Robin Dunn and Total Control Software, Copyright -© 1997-2003.
+© 1997-2006.