changing a panel's color
Carsten A. Arnholm
arnholm at offline.no
Sat Jul 7 15:16:19 PDT 2007
"Bill Baxter" wrote:
> On 7/7/07, Randy Seedle <rseedle at yahoo.com> wrote:
>>
>> How do I change the color of a panel in wxWidgets ?
>> Randy
>
> SetBackgroundColour(...)
> http://www.wxwidgets.org/manuals/2.8/wx_wxwindow.html#wxwindowsetbackgroundcolour
I am writing an application for astronomical use, and a "Night Vision"
feature is sometimes required. I.e. when you use the PC in total darkness,
you want the application to have red panels RGB =(128,0,0), and otherwise
white text fields should be even darker RGB =(64,0,0). The point is that a
PC screen in the dark destroys the dark adaption of the human eye if you
don't do it.
I tried using SetBackgroundColour(...) but it only affects part of the
application. Dialogs are for example not affected unless it is set using
explicit calls to that object. It looks like I would have to make many
explicit calls to lots of different controls to switch to and from a night
vision colour scheme.
Is there some way a global colour scheme like I describe can be set (using
wxWidgets) so all panels, toolbars, menu bars, status bars get one colour,
while text controls, check boxes, radio boxes, list boxes that typically
have white background get another? This should be such that the colour
scheme coiul be changed back and forth while running the program.
Regards
Carsten A. Arnholm
http://arnholm.org/
N59.776 E10.457
More information about the wx-users
mailing list