How do I programmaticaly change gui resource?

I know that if I edit %rootsys%/etc/system.rootrc and change Gui.BackgroundColor to a new value OR make a local .rootrc file with a new value for this item, when I create my gui, the new background color gets set. Is it possible to do this programatically? I’ve triedgEnv->SetValue("Gui.BackgroundColor","#d4d0c8",level);with all possible value of level, but it does’nt seem to work - the gui resources seem to have already been initialized by the time the “root [0]” prompt appears… Thanks
Ed

Hi Ed,

Changing the background color via gEnv will work after gROOT->Reset() but you cannot call it in a compiled program or a named script. The one possible way is to set your background color ‘bcolor’ to all frames in your application using the method:
frame->ChangeBackground(bcolor);

The other ways are to create a graphics context and to use it in the widgets’ constructors or to use the background color parameter of constructors.

Cheers, Ilka