<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>18.4.Widget Name Methods</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="PyGTK 2.0 Tutorial"><link rel="up" href="ch-SettingWidgetAttributes.html" title="Chapter18.Setting Widget Attributes"><link rel="previous" href="sec-WidgetAccelerators.html" title="18.3.Widget Accelerators"><link rel="next" href="sec-WidgetStyles.html" title="18.5.Widget Styles"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">18.4.Widget Name Methods</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="sec-WidgetAccelerators.html">Prev</a></td><th width="60%" align="center">Chapter18.Setting Widget Attributes</th><td width="20%" align="right"><a accesskey="n" href="sec-WidgetStyles.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec-WidgetNameMethods"></a>18.4.Widget Name Methods</h2></div></div><div></div></div><p>The following widget methods set and get the name of a
widget:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
widget.set_name(<b class="parameter"><tt>name</tt></b>)
name = widget.get_name()
</pre></td></tr></table><p><i class="parameter"><tt>name</tt></i> is the string that will be associated
with the <i class="parameter"><tt>widget</tt></i>. 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 <a href="ch-GtkRcFiles.html" title="Chapter23.GTK's rc Files">Chapter23, <i>GTK's rc Files</i></a> for more
details.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="sec-WidgetAccelerators.html">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="ch-SettingWidgetAttributes.html">Up</a></td><td width="40%" align="right"><a accesskey="n" href="sec-WidgetStyles.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">18.3.Widget Accelerators</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">18.5.Widget Styles</td></tr></table></div></body></html>
|