Warning
gtk_widget_modify_bg has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_widget_override_background_color() instead
Sets the background color for a widget in a particular state.
All other style values are left untouched.
See also gtk_widget_modify_style().
Note
Note that "no window" widgets (which have the GTK_NO_WINDOW
flag set) draw on their parent container's window and thus may
not draw any background themselves. This is the case for e.g.
GtkLabel.
To modify the background of such widgets, you have to set the
background color on their parent; if you want to set the background
of a rectangular area around a label, try placing the label in
a GtkEventBox widget and setting the background color on that.
Warning gtk_widget_modify_bg has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_widget_override_background_color() instead Sets the background color for a widget in a particular state. All other style values are left untouched. See also gtk_widget_modify_style(). Note Note that "no window" widgets (which have the GTK_NO_WINDOW flag set) draw on their parent container's window and thus may not draw any background themselves. This is the case for e.g. GtkLabel. To modify the background of such widgets, you have to set the background color on their parent; if you want to set the background of a rectangular area around a label, try placing the label in a GtkEventBox widget and setting the background color on that.