/usr/share/gtk-doc/html/pygtk/class-gtkexpander.html is in python-gtk2-doc 2.24.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.Expander</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gtk-class-reference.html" title="The gtk Class Reference"><link rel="prev" href="class-gtkeventbox.html" title="gtk.EventBox"><link rel="next" href="class-gtkfilechooser.html" title="gtk.FileChooser"></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">gtk.Expander</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkeventbox.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkfilechooser.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.Expander"><a name="class-gtkexpander"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.Expander</h2><p>gtk.Expander — a container that can hide
its child (new in PyGTK 2.4)</p></div><div class="refsect1" title="Synopsis"><a name="id3695598"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.Expander</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkbin.html" title="gtk.Bin">gtk.Bin</a></span></span>):
<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gtkexpander.html#constructor-gtkexpander" title="Constructor">gtk.Expander</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>label</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkexpander.html#method-gtkexpander--set-expanded" title="gtk.Expander.set_expanded">set_expanded</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>expanded</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkexpander.html#method-gtkexpander--get-expanded" title="gtk.Expander.get_expanded">get_expanded</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkexpander.html#method-gtkexpander--set-spacing" title="gtk.Expander.set_spacing">set_spacing</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>spacing</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkexpander.html#method-gtkexpander--get-spacing" title="gtk.Expander.get_spacing">get_spacing</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkexpander.html#method-gtkexpander--set-label" title="gtk.Expander.set_label">set_label</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>label</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkexpander.html#method-gtkexpander--get-label" title="gtk.Expander.get_label">get_label</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkexpander.html#method-gtkexpander--set-use-underline" title="gtk.Expander.set_use_underline">set_use_underline</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>use_underline</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkexpander.html#method-gtkexpander--get-use-underline" title="gtk.Expander.get_use_underline">get_use_underline</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkexpander.html#method-gtkexpander--set-use-markup" title="gtk.Expander.set_use_markup">set_use_markup</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>use_markup</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkexpander.html#method-gtkexpander--get-use-markup" title="gtk.Expander.get_use_markup">get_use_markup</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkexpander.html#method-gtkexpander--set-label-widget" title="gtk.Expander.set_label_widget">set_label_widget</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>label_widget</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkexpander.html#method-gtkexpander--get-label-widget" title="gtk.Expander.get_label_widget">get_label_widget</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkexpander.html#method-gtkexpander--set-label-fill" title="gtk.Expander.set_label_fill">set_label_fill</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkexpander.html#method-gtkexpander--get-label-fill" title="gtk.Expander.get_label_fill">get_label_fill</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><pre class="programlisting">
<span class="bold"><strong>Functions</strong></span>
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkexpander.html#function-gtk--expander-new-with-mnemonic" title="gtk.expander_new_with_mnemonic">gtk.expander_new_with_mnemonic</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>label</code></strong></span><span class="initializer">=None</span></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id3696026"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
+-- <a class="link" href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
+-- <a class="link" href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a>
+-- <a class="link" href="class-gtkcontainer.html" title="gtk.Container">gtk.Container</a>
+-- <a class="link" href="class-gtkbin.html" title="gtk.Bin">gtk.Bin</a>
+-- <a class="link" href="class-gtkexpander.html" title="gtk.Expander">gtk.Expander</a>
</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id3696077"></a><h2>Implemented Interfaces</h2><p>
<a class="link" href="class-gtkexpander.html" title="gtk.Expander"><code class="classname">gtk.Expander</code></a>
implements
<a class="link" href="class-gtkbuildable.html" title="gtk.Buildable"><code class="classname">gtk.Buildable</code></a>
</p></div><div class="refsect1" title="gtk.Expander Properties"><a name="properties-gtkexpander"></a><h2>gtk.Expander Properties</h2><p><a class="link" href="class-gtkobject.html#properties-gtkobject" title="gtk.Object Properties">gtk.Object Properties</a></p><p><a class="link" href="class-gtkwidget.html#properties-gtkwidget" title="gtk.Widget Properties">gtk.Widget Properties</a></p><p><a class="link" href="class-gtkcontainer.html#properties-gtkcontainer" title="gtk.Container Properties">gtk.Container Properties</a></p><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"expanded"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, the expander has been
opened to reveal the child widget.</td></tr><tr valign="top"><td valign="top">"label"</td><td valign="top">Read-Write</td><td valign="top">The text of the expander's label.</td></tr><tr valign="top"><td valign="top">"label-fill"</td><td valign="top">Read-Write</td><td valign="top">Whether the label widget should fill all available horizontal space.</td></tr><tr valign="top"><td valign="top">"label-widget"</td><td valign="top">Read-Write</td><td valign="top">A widget to display in place of the usual expander
label.</td></tr><tr valign="top"><td valign="top">"spacing"</td><td valign="top">Read-Write</td><td valign="top">The space to put between the label and the child.</td></tr><tr valign="top"><td valign="top">"use-markup"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, the text of the label
includes Pango markup. See the <a class="link" href="class-pangoattrlist.html#function-pango--parse-markup" title="pango.parse_markup"><code class="function">pango.parse_markup</code>()</a>
function.</td></tr><tr valign="top"><td valign="top">"use-underline"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, n underline in the text
indicates the next character should be used for the mnemonic accelerator
key.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gtk.Expander Style Properties"><a name="style-properties-gtkexpander"></a><h2>gtk.Expander Style Properties</h2><p><a class="link" href="class-gtkwidget.html#style-properties-gtkwidget" title="gtk.Widget Style Properties">gtk.Widget Style Properties</a></p><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"expander-size"</td><td valign="top">Read</td><td valign="top">The size of the expander arrow.</td></tr><tr valign="top"><td valign="top">"expander-spacing"</td><td valign="top">Read</td><td valign="top">The spacing around expander arrow.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gtk.Expander Signal Prototypes"><a name="signal-prototypes-gtkexpander"></a><h2>gtk.Expander Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p><p><a class="link" href="class-gtkobject.html#signal-prototypes-gtkobject" title="gtk.Object Signal Prototypes">gtk.Object Signal Prototypes</a></p><p><a class="link" href="class-gtkwidget.html#signal-prototypes-gtkwidget" title="gtk.Widget Signal Prototypes">gtk.Widget Signal Prototypes</a></p><p><a class="link" href="class-gtkcontainer.html#signal-prototypes-gtkcontainer" title="gtk.Container Signal Prototypes">gtk.Container Signal Prototypes</a></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">"<a class="link" href="class-gtkexpander.html#signal-gtkexpander--activate" title='The "activate" gtk.Expander Signal'>activate</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>expander</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id3696547"></a><h2>Description</h2><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This widget is available in PyGTK 2.4 and above.</p></div><p>A <a class="link" href="class-gtkexpander.html" title="gtk.Expander"><code class="classname">gtk.Expander</code></a>
allows the user to hide or show its child by clicking on an expander
triangle similar to the triangles used in a <a class="link" href="class-gtktreeview.html" title="gtk.TreeView"><code class="classname">gtk.TreeView</code></a>.</p><p>Normally you use an expander as you would use any other descendant
of <a class="link" href="class-gtkbin.html" title="gtk.Bin"><code class="classname">gtk.Bin</code></a>;
you create the child widget and use <a class="link" href="class-gtkcontainer.html#method-gtkcontainer--add" title="gtk.Container.add"><code class="methodname">gtk.Container.add</code>()</a>
to add it to the expander. When the expander is toggled, it will take
care of showing and hiding the child automatically.</p><div class="refsect2" title="Special Usage"><a name="expander-description-special-usage"></a><h3>Special Usage</h3><p>There there are situations in which you may prefer to show and
hide the expanded widget yourself, such as when you want to actually
create the widget at expansion time. In this case, create a <a class="link" href="class-gtkexpander.html" title="gtk.Expander"><code class="classname">gtk.Expander</code></a>
but do not add a child to it. The expander widget has the "expanded"
property that can be used to monitor its expansion state. You should
watch this property with a signal connection as follows:</p><pre class="programlisting">
expander = gtk.expander_new_with_mnemonic("_More Options")
expander.connect("notify::expanded", expander_callback)
...
def expander_callback(expander, param_spec, user_data):
if expander.get_expanded():
# Show or create widgets
else:
# Hide or destroy widgets
</pre><p>The "activate" signal can also be used to track the expansion
though it occurs before the "expanded" property is changed so the
logic of the <code class="function">expander_callback</code>() function would
have to be reversed.</p></div></div><div class="refsect1" title="Constructor"><a name="constructor-gtkexpander"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.Expander</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>label</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>label</code></strong> :</span></p></td><td>the text of the label or
<code class="literal">None</code></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-gtkexpander.html" title="gtk.Expander"><code class="classname">gtk.Expander</code></a> widget.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This constructor is available in PyGTK 2.4 and above.</p></div><p>Creates a new expander using <em class="parameter"><code>label</code></em> as the
text of the label. If <em class="parameter"><code>label</code></em> is
<code class="literal">None</code> or not specified, no label will be created.</p></div><div class="refsect1" title="Methods"><a name="id3696782"></a><h2>Methods</h2><div class="refsect2" title="gtk.Expander.set_expanded"><a name="method-gtkexpander--set-expanded"></a><h3>gtk.Expander.set_expanded</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_expanded</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>expanded</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>expanded</code></strong> :</span></p></td><td>if <code class="literal">True</code>, the child widget is
revealed</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">set_expanded</code>() method sets the
"expanded" property to the value of <em class="parameter"><code>expanded</code></em>. If
<em class="parameter"><code>expanded</code></em> is <code class="literal">True</code>, the child widget
is revealed; if <code class="literal">False</code>, the child widget is hidden.</p></div><div class="refsect2" title="gtk.Expander.get_expanded"><a name="method-gtkexpander--get-expanded"></a><h3>gtk.Expander.get_expanded</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_expanded</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>True if the child is
revealed.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">get_expanded</code>() method returns the
value of the "expanded" property. If "expanded" is <code class="literal">True</code>
the child widget is revealed.</p></div><div class="refsect2" title="gtk.Expander.set_spacing"><a name="method-gtkexpander--set-spacing"></a><h3>gtk.Expander.set_spacing</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_spacing</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>spacing</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>spacing</code></strong> :</span></p></td><td>the distance between the expander and child
in pixels.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">set_spacing</code>() method sets the
"spacing" property to the value of <em class="parameter"><code>spacing</code></em> that sets
is the number of pixels to place between expander and the child.</p></div><div class="refsect2" title="gtk.Expander.get_spacing"><a name="method-gtkexpander--get-spacing"></a><h3>gtk.Expander.get_spacing</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_spacing</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the spacing between the expander and
child.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">get_spacing</code>() method returns the
value of the "spacing" property set by the <a class="link" href="class-gtkexpander.html#method-gtkexpander--set-spacing" title="gtk.Expander.set_spacing"><code class="methodname">set_spacing()</code></a>
method.</p></div><div class="refsect2" title="gtk.Expander.set_label"><a name="method-gtkexpander--set-label"></a><h3>gtk.Expander.set_label</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_label</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>label</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>label</code></strong> :</span></p></td><td>a string to use as the label or
<code class="literal">None</code></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">set_label</code>() method sets the "label"
property to the value of <em class="parameter"><code>label</code></em> and sets the text of
the label of the expander. Any previously set label will be cleared. If
<em class="parameter"><code>label</code></em> is <code class="literal">None</code> the expander will
have no label.</p></div><div class="refsect2" title="gtk.Expander.get_label"><a name="method-gtkexpander--get-label"></a><h3>gtk.Expander.get_label</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_label</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the text of the label widget.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">get_label</code>() method returns the
value of the "label" property that contains the text of the expander label,
as set by the <a class="link" href="class-gtkexpander.html#method-gtkexpander--set-label" title="gtk.Expander.set_label"><code class="methodname">set_label()</code></a>
method. If the label text has not been set the return value will be
<code class="literal">None</code>.</p></div><div class="refsect2" title="gtk.Expander.set_use_underline"><a name="method-gtkexpander--set-use-underline"></a><h3>gtk.Expander.set_use_underline</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_use_underline</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>use_underline</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>use_underline</code></strong> :</span></p></td><td><code class="literal">True</code> if underlines in the
text indicate mnemonics</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">set_use_underline</code>() method sets the
"use_underline" property to the value of
<em class="parameter"><code>use_underline</code></em>. If
<em class="parameter"><code>use_underline</code></em> is <code class="literal">True</code>, an
underline in the text of the expander label indicates the next character
should be used for the mnemonic accelerator key.</p></div><div class="refsect2" title="gtk.Expander.get_use_underline"><a name="method-gtkexpander--get-use-underline"></a><h3>gtk.Expander.get_use_underline</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_use_underline</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if an embedded
underline in the expander label indicates the mnemonic accelerator
keys.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">get_use_underline</code>() method returns
the value of the "use-underline" property. If "use-underline" is
<code class="literal">True</code> an embedded underline in the expander label
indicates a mnemonic. See the <a class="link" href="class-gtkexpander.html#method-gtkexpander--set-use-underline" title="gtk.Expander.set_use_underline"><code class="methodname">set_use_underline()</code></a>
method.</p></div><div class="refsect2" title="gtk.Expander.set_use_markup"><a name="method-gtkexpander--set-use-markup"></a><h3>gtk.Expander.set_use_markup</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_use_markup</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>use_markup</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>use_markup</code></strong> :</span></p></td><td>if <code class="literal">True</code>, the label's text
should be parsed for markup</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">set_use_markup</code>() method sets the
"use-markup" property to the value of <em class="parameter"><code>use_markup</code></em>. If
<em class="parameter"><code>use_markup</code></em> is <code class="literal">True</code> the text of the
label contains markup in the <a class="link" href="pango-markup-language.html" title="The Pango Markup Language">Pango
text markup language</a>. See the <a class="link" href="class-gtklabel.html#method-gtklabel--set-markup" title="gtk.Label.set_markup"><code class="methodname">gtk.Label.set_markup()</code></a> method for more information.</p></div><div class="refsect2" title="gtk.Expander.get_use_markup"><a name="method-gtkexpander--get-use-markup"></a><h3>gtk.Expander.get_use_markup</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_use_markup</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the label's text
will be parsed for markup</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">get_use_markup</code>() method returns the
value of the "use-markup" property. If "use-markup" is
<code class="literal">True</code>, the label's text is interpreted as marked up with
the <a class="link" href="pango-markup-language.html" title="The Pango Markup Language">Pango text markup
language</a>. See the <a class="link" href="class-gtkexpander.html#method-gtkexpander--set-use-markup" title="gtk.Expander.set_use_markup"><code class="methodname">set_use_markup()</code></a>
method.</p></div><div class="refsect2" title="gtk.Expander.set_label_widget"><a name="method-gtkexpander--set-label-widget"></a><h3>gtk.Expander.set_label_widget</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_label_widget</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>label_widget</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>label_widget</code></strong> :</span></p></td><td>the new label widget or
<code class="literal">None</code></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">set_label_widget</code>() method sets the
expander to use the widget specified by <em class="parameter"><code>label_widget</code></em>
as the label instead of a <a class="link" href="class-gtklabel.html" title="gtk.Label"><code class="classname">gtk.Label</code></a>. This
widget appears embedded alongside the expander arrow. If
<em class="parameter"><code>label_widget</code></em> is <code class="literal">None</code>, the expander
will have no label.</p></div><div class="refsect2" title="gtk.Expander.get_label_widget"><a name="method-gtkexpander--get-label-widget"></a><h3>gtk.Expander.get_label_widget</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_label_widget</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the label widget, or <code class="literal">None</code>
if there is none.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">get_label_widget</code>() method retrieves
the expander's label widget. See the <a class="link" href="class-gtkexpander.html#method-gtkexpander--set-label-widget" title="gtk.Expander.set_label_widget"><code class="methodname">set_label_widget()</code></a>
method.</p></div></div><div class="refsect1" title="Functions"><a name="id3697919"></a><h2>Functions</h2><div class="refsect2" title="gtk.expander_new_with_mnemonic"><a name="function-gtk--expander-new-with-mnemonic"></a><h3>gtk.expander_new_with_mnemonic</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.expander_new_with_mnemonic</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>label</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>label</code></strong> :</span></p></td><td> the text of the label with an underscore in
front of the mnemonic character or <code class="literal">None</code></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> a new <a class="link" href="class-gtkexpander.html" title="gtk.Expander"><code class="classname">gtk.Expander</code></a> widget.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.4 and above.</p></div><p>The <code class="function">gtk.expander_new_with_mnemonic</code>()
function creates a new <a class="link" href="class-gtkexpander.html" title="gtk.Expander"><code class="classname">gtk.Expander</code></a> using
<em class="parameter"><code>label</code></em> as the text of the label. If characters in
<em class="parameter"><code>label</code></em> are preceded by an underscore, they are
underlined. If you need a literal underscore character in a label, use '__'
(two underscores). The first underlined character represents a keyboard
accelerator called a mnemonic. Pressing <span class="keycap"><strong>Alt</strong></span> with that key
activates the button. If <em class="parameter"><code>label</code></em> is
<code class="literal">None</code> the expander will have no label.</p></div><div class="refsect2" title="gtk.Expander.set_label_fill"><a name="method-gtkexpander--set-label-fill"></a><h3>gtk.Expander.set_label_fill</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_label_fill</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>label_fill</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>label_fill</code></strong> :</span></p></td><td><code class="literal">True</code> if the label should should fill all available horizontal space, <code class="literal">False</code> otherwise.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.22 and above.</p></div><p>The <code class="methodname">set_label_fill</code>() method sets whether the label widget should fill all available horizontal space allocated to expander.</p></div><div class="refsect2" title="gtk.Expander.get_label_fill"><a name="method-gtkexpander--get-label-fill"></a><h3>gtk.Expander.get_label_fill</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_label_fill</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the label widget will fill all available horizontal space, <code class="literal">False</code> otherwise.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.22 and above.</p></div><p>The <code class="methodname">get_length</code>() method returns whether the label widget will fill all available horizontal space allocated to expander.</p></div></div><div class="refsect1" title="Signals"><a name="id3698252"></a><h2>Signals</h2><div class="refsect2" title='The "activate" gtk.Expander Signal'><a name="signal-gtkexpander--activate"></a><h3>The "activate" gtk.Expander Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>expander</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>expander</code></em> :</span></p></td><td>the expander that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if
any)</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This signal is available in PyGTK 2.4 and above.</p></div><p>The "activate" signal is emitted when the expander is activated
by the user clicking on the expander toggle. Using the
"notify:expanded" signal may be more appropriate in some cases as
noted in the <a class="link" href="class-gtkexpander.html#expander-description-special-usage" title="Special Usage">Special Usage
description</a>.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gtkeventbox.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gtk-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gtkfilechooser.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.EventBox </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.FileChooser</td></tr></table></div></body></html>
|