wxStaticBoxSizer not inheritting background colour under GTK

Kit Bishop misc at bishop.net.nz
Tue Aug 28 04:48:37 PDT 2007


Robert Roebling wrote:
> Kit Bishop wrote:
>   =

>> 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
>>     =

>
>   =

>> 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.
>>     =

>
> Hm, wxStaticBox has no background at all under GTK+, it is
> drawn on the parent. Are you saying the background of the
> wxStaticBox is different from the parent panel's background?
>
>   Robert
>   =

Yes, that is precisely what I am saying!  The background colour for the
wxStaticBoxSizer is whatever the system setting for the Windows
Background is irrespective of the colour set for the parent panel.

For the record, I tried it under Gnome as well (I normally use KDE) and
it made no difference (didn't think it would) just in case it was a
windows manager issue.  However, result was exactly the same.

I can work around it by doing a SetBackgroundColour on the
wxStaticBoxSizer's wxStaticBox from the parent background colour as per
code in my original message - its just a nuisance though!

Best regards,
Kit

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wx-users/attachments/20070828/6c8=
9f4cf/attachment.htm


More information about the wx-users mailing list