tags:

views:

115

answers:

1

If i am setting GtkEventBox bg color to some custom color on some event like button click.

// Set Window Background color
GdkColor color;
gdk_color_parse("red", &color);
gtk_widget_modify_bg(GTK_WIDGET(myEvtBox), GTK_STATE_NORMAL, &color);

and after another click i need to restore it to original state/color how to do this?
do i need to remember default color of that widget's state?

+2  A: 

You might save yourself some time and get the answer faster if you read the docs more carefully. If you pass NULL instead of &color then you undo the effect of previous calls to gtk_widget_modify_bg().

ptomato
+1 for being right *and* trying to teach Pradeep how to fish!
unwind
Oh! that was a stupid question :P my bad
PP