# Copyright: (c) 2002 by Total Control Software
# Licence: wxWindows license
#----------------------------------------------------------------------
# Copyright: (c) 2002 by Total Control Software
# Licence: wxWindows license
#----------------------------------------------------------------------
wx.PyControl.SetFont(self, font) # same here
self.defBackClr = parent.GetBackgroundColour()
if not self.defBackClr.Ok():
wx.PyControl.SetFont(self, font) # same here
self.defBackClr = parent.GetBackgroundColour()
if not self.defBackClr.Ok():
- wx.EVT_ERASE_BACKGROUND(self, self.OnEraseBackground)
- wx.EVT_PAINT(self, self.OnPaint)
+ self.Bind(wx.EVT_ERASE_BACKGROUND, self.OnEraseBackground)
+ self.Bind(wx.EVT_PAINT, self.OnPaint)
backBrush = wx.Brush(clr, wx.SOLID)
if wx.Platform == "__WXMAC__" and clr == self.defBackClr:
# if colour is still the default then use the striped background on Mac
backBrush = wx.Brush(clr, wx.SOLID)
if wx.Platform == "__WXMAC__" and clr == self.defBackClr:
# if colour is still the default then use the striped background on Mac