how to change togglebutton fontcolor ?

hello,

I want to change the font color of a togglebutton (either ToggleButton or GenToggleButton),
because the toggle buttons are needed to select different character styles,
but how should I do it ?

If it's not possible, what's the best component to override,
ToggleButton or GenToggleButton ?

thanks,
Stef Mientki

Stef Mientki wrote:

hello,

I want to change the font color of a togglebutton (either ToggleButton or GenToggleButton),
because the toggle buttons are needed to select different character styles,
but how should I do it ?

If the native widget supports changing colors then SetForegroundColour will do it.

If it's not possible, what's the best component to override,
ToggleButton or GenToggleButton ?

GenToggleButton, since it is generic you can completely override the drawing of the button if you want.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

thanks Robin,

Robin Dunn wrote:

Stef Mientki wrote:

hello,

I want to change the font color of a togglebutton (either ToggleButton or GenToggleButton),
because the toggle buttons are needed to select different character styles,
but how should I do it ?

If the native widget supports changing colors then SetForegroundColour will do it.

works like a charm !

If it's not possible, what's the best component to override,
ToggleButton or GenToggleButton ?

GenToggleButton, since it is generic you can completely override the drawing of the button if you want.

Well I happily don't need that for now :wink:

cheers,
Stef