wxToggleButton and Background/Foreground colour Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Elmi
Super wx Problem Solver
Super wx Problem Solver
Posts: 293
Joined: Thu Mar 12, 2009 3:23 pm
Location: Germany
Contact:

wxToggleButton and Background/Foreground colour

Post by Elmi » Mon Apr 06, 2009 7:45 am

Hi,

I try to set the back/foreground on a wxToggelButton by calling SetBackgroundColour() and SetForegroundColour() but that does not influence the button.

Isn't that supported for this kind of button?

Elmi

spectrum
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 207
Joined: Sat Jul 21, 2007 12:17 pm

Post by spectrum » Mon Apr 06, 2009 8:37 am

Hi Elmi,

did you try a button->Refresh() after setting the background color ?

greetings
spectrum

Elmi
Super wx Problem Solver
Super wx Problem Solver
Posts: 293
Joined: Thu Mar 12, 2009 3:23 pm
Location: Germany
Contact:

Post by Elmi » Mon Apr 06, 2009 9:44 am

Jepp, that does not help...

So it should work?

Elmi
Super wx Problem Solver
Super wx Problem Solver
Posts: 293
Joined: Thu Mar 12, 2009 3:23 pm
Location: Germany
Contact:

Post by Elmi » Tue Apr 07, 2009 5:14 am

Addendum: it works well using Linux but not under Windows...is there something special to take care about?

Elmi

Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria » Tue Apr 07, 2009 2:28 pm

Elmi wrote:Addendum: it works well using Linux but not under Windows...is there something special to take care about?

Elmi
Unfortunately, this might simply be a platform-specific issue :( might be a case for bug-report and/or using WinAPI

Elmi
Super wx Problem Solver
Super wx Problem Solver
Posts: 293
Joined: Thu Mar 12, 2009 3:23 pm
Location: Germany
Contact:

Post by Elmi » Wed Apr 08, 2009 10:42 am

I got some feedback from the developers: The colour for the buttons in general is no feature for Windows, for the other buttons a hack was implemented that currently does not exist for the toggle button.

Post Reply