Page 1 of 1

Inheriting background color from parent window

Posted: Sun Nov 06, 2011 6:36 am
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.

Re: Inheriting background color from parent window

Posted: Mon Nov 07, 2011 6:23 am
by DerKleineNik
Hey,

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

Greetings