How to change background color in a window



I have been trying to change the background color of a
window in GTK+. I have tried, among other things,
changing the background color in the widget's style
like this
GtkStyle *style;
style = gtk_widget_get_style(window);
style = gtk_style_copy(style); //Saw this one in a
mail //list but I don't get it
style->fg[0] = white; //white defined as a color
before
//I tried all of the other STATES
gtk_widget_set_style(window, style);
gtk_widget_show(window);
gtk_style_unref(style);

But it does not work. How to do it?
Thanks in advance for your help,

Rick  

__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]