Widget.setStateFlags

This function is for use in widget implementations. Turns on flag values in the current widget state (insensitive, prelighted, etc.).

This function accepts the values gtk.types.StateFlags.DirLtr and gtk.types.StateFlags.DirRtl but ignores them. If you want to set the widget's direction, use gtk.widget.Widget.setDirection.

It is worth mentioning that any other state than gtk.types.StateFlags.Insensitive, will be propagated down to all non-internal children if widget is a #GtkContainer, while gtk.types.StateFlags.Insensitive itself will be propagated down to all #GtkContainer children by different means than turning on the state flag down the hierarchy, both gtk.widget.Widget.getStateFlags and gtk.widget.Widget.isSensitive will make use of these.

class Widget
void
setStateFlags

Parameters

flags gtk.types.StateFlags

State flags to turn on

clear bool

Whether to clear state before turning on flags