wxStaticBoxSizer not inheritting background colour under GTK

Kit Bishop misc at bishop.net.nz
Mon Aug 27 03:34:35 PDT 2007


My setups:
Linux: SuSE 10.2, wxWidgets 2.8.4, gcc 4.1.2
Windows: WinXP SP2, wxWidgets 2.8.4, MinGW gcc and MS VC 2005

I have many instances of wxStaticBoxSizer in my application (which I
started building under windows but am now working on Linux in parallel).

Under MSW, the wxStaticBoxSizer gets the same background colour as the
panel it is on.  Under Linux, it seems that it is getting the default
background colour irrespective of the background colour of the panel.

Does anyone know why the behaviour is different and can it be made the same?

I do have a work around put it's a bit of a pain.  Specifically, for
each wxStaticBoxSizer I do:
        sbsizer->GetStaticBox()->SetBackgroundColour
                (
                       
sbsizer->GetStaticBox()->GetParent()->GetBackgroundColour()
                );


Best regards,
Kit Bishop





More information about the wx-users mailing list