Inheriting background color from parent window

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
Victory
Earned some good credits
Earned some good credits
Posts: 115
Joined: Fri Mar 19, 2010 1:20 am

Inheriting background color from parent window

Post by Victory »

wxFrame has a background color attribute ("bg"). When I create a layout in wxFormBuilder and set the "bg" attribute for the frame, all the panels within the frame inherit that background color. But, in the application, when I create the frame by loading the XRC file corresponding to the layout, the child panels do not inherit that background color. What should I do to make the child panels inherit that background color?

I looked at the XRC file and noticed that the "bg" field did indeed get exported into the XRC file.

Thanks.
DerKleineNik
Knows some wx things
Knows some wx things
Posts: 29
Joined: Fri Sep 09, 2011 9:59 am

Re: Inheriting background color from parent window

Post by DerKleineNik »

Hey,

Do you use the bg field when loading the XRC file?
Could you maybe post some code?

Greetings
Post Reply