File: class-gtkexpander.html

package info (click to toggle)
python-gtk2-doc 2.5.2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,304 kB
  • ctags: 3,741
  • sloc: makefile: 38
file content (114 lines) | stat: -rw-r--r-- 31,270 bytes parent folder | download
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
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gtk.Expander</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><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="previous" 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" lang="en"><a name="class-gtkexpander"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>gtk.Expander</h2><p>gtk.Expander &#8212; a container that can hide
    its child (new in PyGTK 2.4)</p></div><div class="refsect1" lang="en"><a name="id3411513"></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 href="class-gtkbin.html" title="gtk.Bin">gtk.Bin</a></span></span>):
<code class="constructorsynopsis">    <span class="methodname"><a href="class-gtkexpander.html#constructor-gtkexpander" title="Constructor">gtk.Expander</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>label</tt></b></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkexpander.html#method-gtkexpander--set-expanded" title="gtk.Expander.set_expanded">set_expanded</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>expanded</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a 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 href="class-gtkexpander.html#method-gtkexpander--set-spacing" title="gtk.Expander.set_spacing">set_spacing</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>spacing</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a 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 href="class-gtkexpander.html#method-gtkexpander--set-label" title="gtk.Expander.set_label">set_label</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>label</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a 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 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"><b class="parameter"><tt>use_underline</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a 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 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"><b class="parameter"><tt>use_markup</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a 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 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"><b class="parameter"><tt>label_widget</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a 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></pre></td></tr></table><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
<span class="bold"><b>Functions</b></span>

<code class="methodsynopsis">    def <span class="methodname"><a 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"><b class="parameter"><tt>label</tt></b></span><span class="initializer">=None</span></span>)</code></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3411771"></a><h2>Ancestry</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="synopsis">+-- <a href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
  +-- <a href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
    +-- <a href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a>
      +-- <a href="class-gtkcontainer.html" title="gtk.Container">gtk.Container</a>
        +-- <a href="class-gtkbin.html" title="gtk.Bin">gtk.Bin</a>
          +-- <a href="class-gtkexpander.html" title="gtk.Expander">gtk.Expander</a>
</pre></td></tr></table><div class="refsect1" lang="en"><a name="id3411811"></a><h2>Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col><col><col></colgroup><tbody><tr valign="top"><td valign="top">"expanded"</td><td valign="top">Read-Write</td><td valign="top">If <tt class="literal">TRUE</tt>, 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-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 <tt class="literal">TRUE</tt>, the text of the label
includes Pango markup. See the <a href="class-pangoattrlist.html#function-pango--parse-markup" title="pango.parse_markup"><tt class="function">pango.parse_markup</tt>()</a>
function.</td></tr><tr valign="top"><td valign="top">"use-underline"</td><td valign="top">Read-Write</td><td valign="top">If <tt class="literal">TRUE</tt>, 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" lang="en"><a name="id3411968"></a><h2>Style Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col><col><col></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><div class="refsect1" lang="en"><a name="id3412044"></a><h2>Signal Prototypes</h2><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term">"<a href="class-gtkexpander.html#signal-gtkexpander--activate" title='The "activate" gtk.Expander Signal'>activate</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>expander</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" lang="en"><a name="id3412089"></a><h2>Description</h2><div class="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 href="class-gtkexpander.html" title="gtk.Expander"><tt class="classname">gtk.Expander</tt></a>
allows the user to hide or show its child by clicking on an expander
triangle similar to the triangles used in a <a href="class-gtktreeview.html" title="gtk.TreeView"><tt class="classname">gtk.TreeView</tt></a>.</p><p>Normally you use an expander as you would use any other descendant
of <a href="class-gtkbin.html" title="gtk.Bin"><tt class="classname">gtk.Bin</tt></a>; you
create the child widget and use <a href="class-gtkcontainer.html#method-gtkcontainer--add" title="gtk.Container.add"><tt class="methodname">gtk.Container.add</tt>()</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" lang="en"><a name="id3412139"></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 href="class-gtkexpander.html" title="gtk.Expander"><tt class="classname">gtk.Expander</tt></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><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><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></td></tr></table><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 <tt class="function">expander_callback</tt>() function would have to be
reversed.</p></div></div><div class="refsect1" lang="en"><a name="constructor-gtkexpander"></a><h2>Constructor</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gtk.Expander</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>label</tt></b></span><span class="initializer">=None</span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>label</tt></b>:</span></td><td>the text of the label or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-gtkexpander.html" title="gtk.Expander"><tt class="classname">gtk.Expander</tt></a> widget.</td></tr></tbody></table><div class="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 <i class="parameter"><tt>label</tt></i> as the
text of the label. If <i class="parameter"><tt>label</tt></i> is
<tt class="literal">None</tt> or not specified, no label will be created.</p></div><div class="refsect1" lang="en"><a name="id3412267"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtkexpander--set-expanded"></a><h3>gtk.Expander.set_expanded</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_expanded</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>expanded</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>expanded</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt>, the child widget is
revealed</td></tr></tbody></table><div class="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 <tt class="methodname">set_expanded</tt>() method sets the
"expanded" property to the value of <i class="parameter"><tt>expanded</tt></i>. If
<i class="parameter"><tt>expanded</tt></i> is <tt class="literal">TRUE</tt>, the child widget
is revealed; if <tt class="literal">FALSE</tt>, the child widget is hidden.</p></div><div class="refsect2" lang="en"><a name="method-gtkexpander--get-expanded"></a><h3>gtk.Expander.get_expanded</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_expanded</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>TRUE if the child is
revealed.</td></tr></tbody></table><div class="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 <tt class="methodname">get_expanded</tt>() method returns the
value of the "expanded" property. If "expanded" is <tt class="literal">TRUE</tt>
the child widget is revealed.</p></div><div class="refsect2" lang="en"><a name="method-gtkexpander--set-spacing"></a><h3>gtk.Expander.set_spacing</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_spacing</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>spacing</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>spacing</tt></b>:</span></td><td>the distance between the expander and child
in pixels.</td></tr></tbody></table><div class="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 <tt class="methodname">set_spacing</tt>() method sets the
"spacing" property to the value of <i class="parameter"><tt>spacing</tt></i> that sets
is the number of pixels to place between expander and the child.</p></div><div class="refsect2" lang="en"><a name="method-gtkexpander--get-spacing"></a><h3>gtk.Expander.get_spacing</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_spacing</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the spacing between the expander and
child.</td></tr></tbody></table><div class="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 <tt class="methodname">get_spacing</tt>() method returns the
value of the "spacing" property set by the <a href="class-gtkexpander.html#method-gtkexpander--set-spacing" title="gtk.Expander.set_spacing"><tt class="methodname">set_spacing()</tt></a>
method.</p></div><div class="refsect2" lang="en"><a name="method-gtkexpander--set-label"></a><h3>gtk.Expander.set_label</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_label</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>label</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>label</tt></b>:</span></td><td>a string to use as the label or
<tt class="literal">None</tt></td></tr></tbody></table><div class="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 <tt class="methodname">set_label</tt>() method sets the "label"
property to the value of <i class="parameter"><tt>label</tt></i> and sets the text of
the label of the expander. Any previously set label will be cleared. If
<i class="parameter"><tt>label</tt></i> is <tt class="literal">None</tt> the expander will
have no label.</p></div><div class="refsect2" lang="en"><a name="method-gtkexpander--get-label"></a><h3>gtk.Expander.get_label</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_label</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the text of the label widget.</td></tr></tbody></table><div class="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 <tt class="methodname">get_label</tt>() method returns the
value of the "label" property that contains the text of the expander label,
as set by the <a href="class-gtkexpander.html#method-gtkexpander--set-label" title="gtk.Expander.set_label"><tt class="methodname">set_label()</tt></a>
method. If the label text has not been set the return value will be
<tt class="literal">None</tt>.</p></div><div class="refsect2" lang="en"><a name="method-gtkexpander--set-use-underline"></a><h3>gtk.Expander.set_use_underline</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_use_underline</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>use_underline</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>use_underline</tt></b>:</span></td><td><tt class="literal">TRUE</tt> if underlines in the
text indicate mnemonics</td></tr></tbody></table><div class="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 <tt class="methodname">set_use_underline</tt>() method sets the
"use_underline" property to the value of
<i class="parameter"><tt>use_underline</tt></i>. If
<i class="parameter"><tt>use_underline</tt></i> is <tt class="literal">TRUE</tt>, 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" lang="en"><a name="method-gtkexpander--get-use-underline"></a><h3>gtk.Expander.get_use_underline</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_use_underline</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if an embedded
underline in the expander label indicates the mnemonic accelerator
keys.</td></tr></tbody></table><div class="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 <tt class="methodname">get_use_underline</tt>() method returns
the value of the "use-underline" property. If "use-underline" is
<tt class="literal">TRUE</tt> an embedded underline in the expander label
indicates a mnemonic. See the <a href="class-gtkexpander.html#method-gtkexpander--set-use-underline" title="gtk.Expander.set_use_underline"><tt class="methodname">set_use_underline()</tt></a>
method.</p></div><div class="refsect2" lang="en"><a name="method-gtkexpander--set-use-markup"></a><h3>gtk.Expander.set_use_markup</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_use_markup</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>use_markup</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>use_markup</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt>, the label's text
should be parsed for markup</td></tr></tbody></table><div class="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 <tt class="methodname">set_use_markup</tt>() method sets the
"use-markup" property to the value of <i class="parameter"><tt>use_markup</tt></i>. If
<i class="parameter"><tt>use_markup</tt></i> is <tt class="literal">TRUE</tt> the text of the
label contains markup in the <a href="pango-markup-language.html" title="The Pango Markup Language">Pango
text markup language</a>. See the <a href="class-gtklabel.html#method-gtklabel--set-markup" title="gtk.Label.set_markup"><tt class="methodname">gtk.Label.set_markup()</tt></a> method for more information.</p></div><div class="refsect2" lang="en"><a name="method-gtkexpander--get-use-markup"></a><h3>gtk.Expander.get_use_markup</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_use_markup</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the label's text
will be parsed for markup</td></tr></tbody></table><div class="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 <tt class="methodname">get_use_markup</tt>() method returns the
value of the "use-markup" property. If "use-markup" is
<tt class="literal">TRUE</tt>, the label's text is interpreted as marked up with
the <a href="pango-markup-language.html" title="The Pango Markup Language">Pango text markup
language</a>. See the <a href="class-gtkexpander.html#method-gtkexpander--set-use-markup" title="gtk.Expander.set_use_markup"><tt class="methodname">set_use_markup()</tt></a>
method.</p></div><div class="refsect2" lang="en"><a name="method-gtkexpander--set-label-widget"></a><h3>gtk.Expander.set_label_widget</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_label_widget</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>label_widget</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>label_widget</tt></b>:</span></td><td>the new label widget or
<tt class="literal">None</tt></td></tr></tbody></table><div class="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 <tt class="methodname">set_label_widget</tt>() method sets the
expander to use the widget specified by <i class="parameter"><tt>label_widget</tt></i>
as the label instead of a <a href="class-gtklabel.html" title="gtk.Label"><tt class="classname">gtk.Label</tt></a>. This
widget appears embedded alongside the expander arrow. If
<i class="parameter"><tt>label_widget</tt></i> is <tt class="literal">None</tt>, the expander
will have no label.</p></div><div class="refsect2" lang="en"><a name="method-gtkexpander--get-label-widget"></a><h3>gtk.Expander.get_label_widget</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_label_widget</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the label widget, or <tt class="literal">None</tt>
if there is none.</td></tr></tbody></table><div class="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 <tt class="methodname">get_label_widget</tt>() method retrieves
the expander's label widget. See the <a href="class-gtkexpander.html#method-gtkexpander--set-label-widget" title="gtk.Expander.set_label_widget"><tt class="methodname">set_label_widget()</tt></a>
method.</p></div></div><div class="refsect1" lang="en"><a name="id3413080"></a><h2>Functions</h2><div class="refsect2" lang="en"><a name="function-gtk--expander-new-with-mnemonic"></a><h3>gtk.expander_new_with_mnemonic</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gtk.expander_new_with_mnemonic</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>label</tt></b></span><span class="initializer">=None</span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>label</tt></b>:</span></td><td> the text of the label with an underscore in
front of the mnemonic character or <tt class="literal">None</tt></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> a new <a href="class-gtkexpander.html" title="gtk.Expander"><tt class="classname">gtk.Expander</tt></a> widget.</td></tr></tbody></table><div class="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 <tt class="function">gtk.expander_new_with_mnemonic</tt>()
function creates a new <a href="class-gtkexpander.html" title="gtk.Expander"><tt class="classname">gtk.Expander</tt></a> using
<i class="parameter"><tt>label</tt></i> as the text of the label. If characters in
<i class="parameter"><tt>label</tt></i> 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><b class="keycap">Alt</b></span> with that key
activates the button. If <i class="parameter"><tt>label</tt></i> is
<tt class="literal">None</tt> the expander will have no label.</p></div></div><div class="refsect1" lang="en"><a name="id3413194"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="signal-gtkexpander--activate"></a><h3>The "activate" gtk.Expander Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>expander</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>expander</tt></i>:</span></td><td>the expander that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><div class="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.</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>