This file is indexed.

/usr/share/doc/python-gtk2-tutorial/html/sec-ExpanderWidget.html is in python-gtk2-tutorial 2.4-1.

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
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>16.5. Expander Widgets</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-NewInPyGTK2.4.html" title="Chapter 16. New Widgets in PyGTK 2.4"><link rel="previous" href="sec-EntryCompletion.html" title="16.4. EntryCompletion Objects"><link rel="next" href="sec-FileChoosers.html" title="16.6. File Selections using FileChooser-based Widgets"></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">16.5. Expander Widgets</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="sec-EntryCompletion.html">Prev</a> </td><th width="60%" align="center">Chapter 16. New Widgets in PyGTK 2.4</th><td width="20%" align="right"> <a accesskey="n" href="sec-FileChoosers.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-ExpanderWidget"></a>16.5. Expander Widgets</h2></div></div><div></div></div><p>The <tt class="classname">Expander</tt> widget is a fairly simple
container widget that can reveal or hide its child widget by clicking on a
triangle similar to the triangle in a <tt class="classname">TreeView</tt>. A new
<tt class="classname">Expander</tt> is created using the constructor:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
  expander = gtk.Expander(<b class="parameter"><tt>label</tt></b>=None)
</pre></td></tr></table><p>where <i class="parameter"><tt>label</tt></i> is a string to be used as the
expander label. If <i class="parameter"><tt>label</tt></i> is <tt class="literal">None</tt>
or not specified, no label is created. Alternatively, you can use the
function:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
  expander = gtk.expander_new_with_mnemonic(<b class="parameter"><tt>label</tt></b>=None)
</pre></td></tr></table><p>that sets the character in label preceded by an underscore as a
mnemonic keyboard accelerator.</p><p>The <tt class="classname">Expander</tt> widget uses the
<tt class="classname">Container</tt> API to add and remove its child
widget:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
  expander.add(<b class="parameter"><tt>widget</tt></b>)

  expander.remove(<b class="parameter"><tt>widget</tt></b>)
</pre></td></tr></table><p>The child widget can be retrieved using the
<tt class="classname">Bin</tt> "child" attribute or the
<tt class="methodname">get_child</tt>() method.</p><p>The setting that controls the interpretation of label underscores
can be retrieved and changed using the methods:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
  use_underline = expander.get_use_underline()

  expander.set_use_underline(use_underline)
</pre></td></tr></table><p>If you want to use Pango markup (see the <a href="http://www.pygtk.org//pygtk2reference/pango-markup-language.html" target="_top">Pango
Markup reference</a> for more detail) in the label string, use the
following methods to set and retrieve the setting of the "use-markup"
property:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
  expander.set_use_markup(<b class="parameter"><tt>use_markup</tt></b>)

  use_markup = expander.get_use_markup()
</pre></td></tr></table><p>Finally, you can use any widget as the label widget using the
following method:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
  expander.set_label_widget(<b class="parameter"><tt>label_widget</tt></b>)
</pre></td></tr></table><p>This allows you, for example, to use an <tt class="classname">HBox</tt>
packed with an <tt class="classname">Image</tt> and a
<tt class="classname">Label</tt> as the <tt class="classname">Expander</tt>
label.</p><p>The state of the <tt class="classname">Expander</tt> can be retrieved
and set using the methods:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
  expanded = expander.get_expanded()

  expander.set_expanded(<b class="parameter"><tt>expanded</tt></b>)
</pre></td></tr></table><p>If <i class="parameter"><tt>expanded</tt></i> is <tt class="literal">TRUE</tt> the
child widget is revealed.</p><p>In most cases the <tt class="classname">Expander</tt> automatically does
exactly what you want when revealing and hiding the child widget. In some
cases your application might want to create a child widget at expansion
time. The "notify::expanded" signal can be used to track changes in the
state of the expander triangle. The signal handler can then create or change
the child widget as needed.</p><p>The example program <a href="examples/expander.py" target="_top">expander.py</a> demonstrates the use of the
<tt class="classname">Expander</tt>. <a href="sec-ExpanderWidget.html#expanderfig" title="Figure 16.11. Expander Widget">Figure 16.11, &#8220;Expander Widget&#8221;</a> illustrates the program
in operation:</p><div class="figure"><a name="expanderfig"></a><p class="title"><b>Figure 16.11. Expander Widget</b></p><div class="mediaobject" align="center"><img src="figures/expander.png" align="middle" alt="Expander Widget"></div></div><p>The program creates a <tt class="classname">Label</tt> containing the
current time and shows it when the expander is expanded.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="sec-EntryCompletion.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch-NewInPyGTK2.4.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="sec-FileChoosers.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">16.4. EntryCompletion Objects </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 16.6. File Selections using FileChooser-based Widgets</td></tr></table></div></body></html>