- clr = self.GetBackgroundColour()
- 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.SetMacTheme(1) # 1 == kThemeBrushDialogBackgroundActive
- dc.SetBackground(backBrush)
-
- dc.SetTextForeground(self.GetForegroundColour())
- dc.Clear()
+ if BUFFERED:
+ clr = self.GetBackgroundColour()
+ 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.MacSetTheme(1) # 1 == kThemeBrushDialogBackgroundActive
+ dc.SetBackground(backBrush)
+ dc.Clear()
+
+ if self.IsEnabled():
+ dc.SetTextForeground(self.GetForegroundColour())
+ else:
+ dc.SetTextForeground(wx.SystemSettings.GetColour(wx.SYS_COLOUR_GRAYTEXT))
+