- EVT_LEFT_DOWN(self, self.OnLeftDown)
- EVT_LEFT_UP(self, self.OnLeftUp)
- EVT_RIGHT_UP(self, self.OnRightUp)
- EVT_MOTION(self, self.OnMotion)
+ self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)
+ self.Bind(wx.EVT_LEFT_UP, self.OnLeftUp)
+ self.Bind(wx.EVT_RIGHT_UP, self.OnRightUp)
+ self.Bind(wx.EVT_MOTION, self.OnMotion)
+
+ # the window resize event and idle events for managing the buffer
+ self.Bind(wx.EVT_SIZE, self.OnSize)
+ self.Bind(wx.EVT_IDLE, self.OnIdle)