modify_base


Description:

[ Version ( deprecated = true , deprecated_since = "3.0" , replacement = "override_background_color" ) ]
public void modify_base (StateType state, Color? color)

Warning: modify_base is deprecated since 3.0. Use override_background_color.

Sets the base color for a widget in a particular state.

Note:

All other style values are left untouched. The base color is the background color used along with the text color (see modify_text) for widgets such as Entry and TextView. See also 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. Label.

To modify the background of such widgets, you have to set the base color on their parent; if you want to set the background of a rectangular area around a label, try placing the label in a EventBox widget and setting the base color on that.

Parameters:

this

a Widget

state

the state for which to set the base color

color

the color to assign (does not need to be allocated), or null to undo the effect of previous calls to of modify_base.