[wx-discuss] Changing the colour of a wx.RadioBox

Simon Garrett simongarrett at ukhome.net
Fri Jan 4 06:30:57 PST 2008


Hi All,

Is it possible to change the text colour of a RadioBox,  
programatically?  I know something like,

   rb = wx.RadioBox( ... )
   rb.SetForegroundColour(col)

doesn't work, probably because RadioBox objects are composed of Radio  
button objects and various wx.DC calls.  And I can't access the dc  
internal to the RadioBox object, presumably, can I?

I also know that the standard RadioBox is set up so that  
ShouldInheritColours returns True (I tried subclassing RadioBox,  
overloading ShouldInheritColours to return False, and it still didn't  
let me change the colour of the text).

I've tried making sure the parent window has its Foreground colour  
set to the desired colour (#eeeeee), so the RadioBox inherits it, but  
that doesn't seem to work either.

My only option seems to be writing my own radio box class from  
scratch, but that seems insane!  Is there another option?

I'm on Mac OS 10.4, Python2.5.1, wx2.8.4.0.

Any help would be wonderful, I've been banging my head against a  
figurative brick wall for days now...

Best regards,

Simon.

--Dr. Simon Garrett--
This is my home account.  Work contacts are:
UWA:  smg at aber.ac.uk
Aispire:  S.Garrett at aispire.co.uk




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wx-discuss/attachments/20080104/fcf08f04/attachment.htm


More information about the wx-discuss mailing list