+ def SetBackgroundColour(self, colour):
+ wxWindow.SetBackgroundColour(self, colour)
+
+ # Calculate a new set of highlight and shadow colours based on
+ # the new background colour. Works okay if the colour is dark...
+ r, g, b = colour.Get()
+ fr, fg, fb = min(255,r+32), min(255,g+32), min(255,b+32)
+ self.faceDnClr = wxColour(fr, fg, fb)
+ sr, sg, sb = max(0,r-32), max(0,g-32), max(0,b-32)
+ self.shadowPen = wxPen(wxColour(sr,sg,sb), 1, wxSOLID)
+ hr, hg, hb = min(255,r+64), min(255,g+64), min(255,b+64)
+ self.highlightPen = wxPen(wxColour(hr,hg,hb), 1, wxSOLID)
+
+
+ def _GetLabelSize(self):
+ """ used internally """
+ w, h = self.GetTextExtent(self.GetLabel())
+ return w, h, true
+
+