Various layout tweaks, wx.FIXED_SIZE added, etc.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26655 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-04-07 21:25:11 +00:00
parent a78cb66358
commit 102e2b26c0
9 changed files with 35 additions and 32 deletions

View File

@@ -51,14 +51,14 @@ TICKS_DECIMAL = 16
TICKS_ROMAN = 32
class AnalogClockWindow(wx.Window):
class AnalogClockWindow(wx.PyWindow):
"""An analog clock window"""
def __init__(self, parent, ID=-1, pos=wx.DefaultPosition, size=wx.DefaultSize,
style=0, name="clock"):
# Initialize the wxWindow...
wx.Window.__init__(self, parent, ID, pos, size, style, name)
wx.PyWindow.__init__(self, parent, ID, pos, size, style, name)
# Initialize some variables and defaults...
self.clockStep = 1
@@ -124,6 +124,8 @@ class AnalogClockWindow(wx.Window):
self.timer = wx.Timer(self)
self.timer.Start(500)
def DoGetBestSize(self):
return wx.Size(25,25)
def OnPaint(self, event):
self._doDrawHands(wx.BufferedPaintDC(self), True)