18.4. Widget Name Methods

The following widget methods set and get the name of a widget:

  widget.set_name(name)

  name = widget.get_name()

name is the string that will be associated with the widget. This is useful for specifying styles to be used with specific widgets within an application. The name of the widget can be used to narrow the application of the style as opposed to using the widget's class. See Chapter 23, GTK's rc Files for more details.