/usr/share/gtk-doc/html/pygtk/class-gtkbox.html is in python-gtk2-doc 2.24.0-4.
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 122 123 124 125 126 127 128 129 130 131 132 133 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.Box</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-gtkborder.html" title="gtk.Border"><link rel="next" href="class-gtkbuildable.html" title="gtk.Buildable"></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.Box</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkborder.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkbuildable.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.Box"><a name="class-gtkbox"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.Box</h2><p>gtk.Box — an abstract base class for box containers</p></div><div class="refsect1" title="Synopsis"><a name="id3559993"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.Box</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkcontainer.html" title="gtk.Container">gtk.Container</a></span></span>):
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkbox.html#method-gtkbox--pack-start" title="gtk.Box.pack_start">pack_start</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>expand</code></strong></span><span class="initializer">=True</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>fill</code></strong></span><span class="initializer">=True</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>padding</code></strong></span><span class="initializer">=0</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkbox.html#method-gtkbox--pack-end" title="gtk.Box.pack_end">pack_end</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>expand</code></strong></span><span class="initializer">=True</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>fill</code></strong></span><span class="initializer">=True</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>padding</code></strong></span><span class="initializer">=0</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkbox.html#method-gtkbox--pack-start-defaults" title="gtk.Box.pack_start_defaults">pack_start_defaults</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>widget</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkbox.html#method-gtkbox--pack-end-defaults" title="gtk.Box.pack_end_defaults">pack_end_defaults</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>widget</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkbox.html#method-gtkbox--set-homogeneous" title="gtk.Box.set_homogeneous">set_homogeneous</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>homogeneous</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkbox.html#method-gtkbox--get-homogeneous" title="gtk.Box.get_homogeneous">get_homogeneous</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkbox.html#method-gtkbox--set-spacing" title="gtk.Box.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-gtkbox.html#method-gtkbox--get-spacing" title="gtk.Box.get_spacing">get_spacing</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkbox.html#method-gtkbox--reorder-child" title="gtk.Box.reorder_child">reorder_child</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>position</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkbox.html#method-gtkbox--query-child-packing" title="gtk.Box.query_child_packing">query_child_packing</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkbox.html#method-gtkbox--set-child-packing" title="gtk.Box.set_child_packing">set_child_packing</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>expand</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>fill</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>padding</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pack_type</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3365621"></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-gtkbox.html" title="gtk.Box">gtk.Box</a>
</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id3559580"></a><h2>Implemented Interfaces</h2><p>
<a class="link" href="class-gtkbox.html" title="gtk.Box"><code class="classname">gtk.Box</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.Box Properties"><a name="properties-gtkbox"></a><h2>gtk.Box 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="3.5in"></colgroup><tbody><tr valign="top"><td valign="top">"spacing"</td><td valign="top">Read/Write</td><td valign="top">The amount of space between children.</td></tr><tr valign="top"><td valign="top">"homogeneous"</td><td valign="top">Read/Write</td><td valign="top">If True the children should all be the same size.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gtk.Box Style Properties"><a name="style-properties-gtkbox"></a><h2>gtk.Box 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><div class="refsect1" title="gtk.Box Child Properties"><a name="child-properties-gtkbox"></a><h2>gtk.Box Child 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 width="1in"><col width="1in"><col width="3.5in"></colgroup><tbody><tr valign="top"><td valign="top">"expand"</td><td valign="top">Read/Write</td><td valign="top">If <code class="literal">True</code> the child should receive
extra space when the parent grows</td></tr><tr valign="top"><td valign="top">"fill"</td><td valign="top">Read/Write</td><td valign="top">If <code class="literal">True</code> extra space given to the
child should be allocated to the child; if
<code class="literal">False</code> extra space given to the child should
be used as padding</td></tr><tr valign="top"><td valign="top">"padding"</td><td valign="top">Read/Write</td><td valign="top">The amount of extra space to put between the child and
its neighbors, in pixels</td></tr><tr valign="top"><td valign="top">"pack-type"</td><td valign="top">Read/Write</td><td valign="top">Indicates whether the child is packed with reference to
the start (<code class="literal">gtk.PACK_START</code>) or end
(<code class="literal">gtk.PACK_END</code>) of the parent</td></tr><tr valign="top"><td valign="top">"position"</td><td valign="top">Read/Write</td><td valign="top">The index of the child in the parent</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gtk.Box Signal Prototypes"><a name="signal-prototypes-gtkbox"></a><h2>gtk.Box 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></div><div class="refsect1" title="Description"><a name="id3547608"></a><h2>Description</h2><p>The <a class="link" href="class-gtkbox.html" title="gtk.Box"><code class="classname">gtk.Box</code></a> class is an
abstract base class defining a widget that encapsulates functionality for a
particular kind of container, one that organizes a variable number of
widgets into a rectangular area. <a class="link" href="class-gtkbox.html" title="gtk.Box"><code class="classname">gtk.Box</code></a> currently has
two families of derived classes: <a class="link" href="class-gtkhbox.html" title="gtk.HBox"><code class="classname">gtk.HBox</code></a> and <a class="link" href="class-gtkvbox.html" title="gtk.VBox"><code class="classname">gtk.VBox</code></a> being one,
and <a class="link" href="class-gtkhbuttonbox.html" title="gtk.HButtonBox"><code class="classname">gtk.HButtonBox</code></a> and <a class="link" href="class-gtkvbuttonbox.html" title="gtk.VButtonBox"><code class="classname">gtk.VButtonBox</code></a> --
the other.</p><p>The rectangular area of a <a class="link" href="class-gtkbox.html" title="gtk.Box"><code class="classname">gtk.Box</code></a> is organized
into either a single row or a single column of child widgets depending upon
whether the box is of type <a class="link" href="class-gtkhbox.html" title="gtk.HBox"><code class="classname">gtk.HBox</code></a> or <a class="link" href="class-gtkvbox.html" title="gtk.VBox"><code class="classname">gtk.VBox</code></a>,
respectively. Thus, all children of a <a class="link" href="class-gtkbox.html" title="gtk.Box"><code class="classname">gtk.Box</code></a> are allocated
one dimension in common, which is the height of a row, or the width of a
column.</p><p><a class="link" href="class-gtkbox.html" title="gtk.Box"><code class="classname">gtk.Box</code></a>
uses a notion of packing. Packing refers to adding widgets with reference to
a particular position in a <a class="link" href="class-gtkbox.html" title="gtk.Box"><code class="classname">gtk.Container</code></a>. For a
<a class="link" href="class-gtkbox.html" title="gtk.Box"><code class="classname">gtk.Box</code></a>, there
are two reference positions: the start and the end of the box. For a <a class="link" href="class-gtkvbox.html" title="gtk.VBox"><code class="classname">gtk.VBox</code></a>, the start is
defined as the top of the box and the end is defined as the bottom. For a
<a class="link" href="class-gtkhbox.html" title="gtk.HBox"><code class="classname">gtk.HBox</code></a> the
start is defined as the left side and the end is defined as the right
side.</p><p>Repeated calls to <a class="link" href="class-gtkbox.html#method-gtkbox--pack-start" title="gtk.Box.pack_start"><code class="methodname">pack_start</code>()</a>
pack widgets into a <a class="link" href="class-gtkbox.html" title="gtk.Box"><code class="classname">gtk.Box</code></a> from start to
end. The <a class="link" href="class-gtkbox.html#method-gtkbox--pack-end" title="gtk.Box.pack_end"><code class="methodname">pack_end</code>()</a>
method adds widgets from end to start. You may intersperse these calls and
add widgets from both ends of the same <a class="link" href="class-gtkbox.html" title="gtk.Box"><code class="classname">gtk.Box</code></a>.</p><p>Because <a class="link" href="class-gtkbox.html" title="gtk.Box"><code class="classname">gtk.Box</code></a> is a <a class="link" href="class-gtkcontainer.html" title="gtk.Container"><code class="classname">gtk.Container</code></a>,
you may also use <a class="link" href="class-gtkcontainer.html#method-gtkcontainer--add" title="gtk.Container.add"><code class="methodname">add</code>()</a> to
insert widgets into the box, and they will be packed as if with the <a class="link" href="class-gtkbox.html#method-gtkbox--pack-start-defaults" title="gtk.Box.pack_start_defaults"><code class="methodname">pack_start</code>()</a>
method. Use <a class="link" href="class-gtkcontainer.html#method-gtkcontainer--remove" title="gtk.Container.remove"><code class="methodname">remove</code>()</a>
to remove widgets from the <a class="link" href="class-gtkbox.html" title="gtk.Box"><code class="classname">gtk.Box</code></a>.</p><p>The <a class="link" href="class-gtkbox.html#method-gtkbox--set-homogeneous" title="gtk.Box.set_homogeneous"><code class="methodname">set_homogeneous</code>()</a>
method specifies whether or not all children of the <a class="link" href="class-gtkbox.html" title="gtk.Box"><code class="classname">gtk.Box</code></a> are forced to
get the same amount of space.</p><p>The <a class="link" href="class-gtkbox.html#method-gtkbox--set-spacing" title="gtk.Box.set_spacing"><code class="methodname">set_spacing</code>()</a>
method determines how much space will be minimally placed between all
children in the <a class="link" href="class-gtkbox.html" title="gtk.Box"><code class="classname">gtk.Box</code></a>.</p><p>The <a class="link" href="class-gtkbox.html#method-gtkbox--reorder-child" title="gtk.Box.reorder_child"><code class="methodname">reorder_child</code>()</a>
method moves a <a class="link" href="class-gtkbox.html" title="gtk.Box"><code class="classname">gtk.Box</code></a> child to a
different place in the box.</p><p>The <a class="link" href="class-gtkbox.html#method-gtkbox--set-child-packing" title="gtk.Box.set_child_packing"><code class="methodname">set_child_packing</code>()</a>
method resets the expand, fill, and padding attributes of any <a class="link" href="class-gtkbox.html" title="gtk.Box"><code class="classname">gtk.Box</code></a> child. Use the
<a class="link" href="class-gtkbox.html#method-gtkbox--query-child-packing" title="gtk.Box.query_child_packing"><code class="methodname">query_child_packing</code>()</a>
to query these properties.</p></div><div class="refsect1" title="Methods"><a name="id3533468"></a><h2>Methods</h2><div class="refsect2" title="gtk.Box.pack_start"><a name="method-gtkbox--pack-start"></a><h3>gtk.Box.pack_start</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pack_start</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>expand</code></strong></span><span class="initializer">=True</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>fill</code></strong></span><span class="initializer">=True</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>padding</code></strong></span><span class="initializer">=0</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>child</code></strong> :</span></p></td><td>the widget to be added to the
box</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>expand</code></strong> :</span></p></td><td>True if <em class="parameter"><code>child</code></em> is to be
given extra space allocated to box. The extra space will be divided evenly
between all children of box that use this option.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>fill</code></strong> :</span></p></td><td>True if space given to
<em class="parameter"><code>child</code></em> by the <em class="parameter"><code>expand</code></em> option is
actually allocated to <em class="parameter"><code>child</code></em>, rather than just padding
it. This parameter has no effect if <em class="parameter"><code>expand</code></em> is set to
False. A child is always allocated the full height of a <a class="link" href="class-gtkhbox.html" title="gtk.HBox"><code class="classname">gtk.HBox</code></a> and the full
width of a <a class="link" href="class-gtkvbox.html" title="gtk.VBox"><code class="classname">gtk.VBox</code></a>. This option
affects the other dimension.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>padding</code></strong> :</span></p></td><td>extra space in pixels to put between
<em class="parameter"><code>child</code></em> and its neighbors, over and above the global
amount specified by <em class="parameter"><code>spacing</code></em> in <a class="link" href="class-gtkhbox.html" title="gtk.HBox"><code class="classname">gtk.Box</code></a>. If
<em class="parameter"><code>child</code></em> is a widget at one of the reference ends of
box, then <em class="parameter"><code>padding</code></em> pixels are also put between
<em class="parameter"><code>child</code></em> and the reference edge of
box.</td></tr></tbody></table><p>The <code class="methodname">pack_start</code>() method adds
<em class="parameter"><code>child</code></em> to the box, packed with reference to the start
of box. The <em class="parameter"><code>child</code></em> is packed after any other child
packed with reference to the start of box. </p></div><div class="refsect2" title="gtk.Box.pack_end"><a name="method-gtkbox--pack-end"></a><h3>gtk.Box.pack_end</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pack_end</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>expand</code></strong></span><span class="initializer">=True</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>fill</code></strong></span><span class="initializer">=True</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>padding</code></strong></span><span class="initializer">=0</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>child</code></strong> :</span></p></td><td>the widget to be added to the
box</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>expand</code></strong> :</span></p></td><td>True if <em class="parameter"><code>child</code></em> is to be
given extra space allocated to box. The extra space will be divided evenly
between all children of box that use this option.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>fill</code></strong> :</span></p></td><td>True if space given to
<em class="parameter"><code>child</code></em> by the <em class="parameter"><code>expand</code></em> option is
actually allocated to <em class="parameter"><code>child</code></em>, rather than just padding
it. This parameter has no effect if <em class="parameter"><code>expand</code></em> is set to
False. A child is always allocated the full height of a <a class="link" href="class-gtkhbox.html" title="gtk.HBox"><code class="classname">gtk.HBox</code></a> and the full
width of a <a class="link" href="class-gtkvbox.html" title="gtk.VBox"><code class="classname">gtk.VBox</code></a>. This option
affects the other dimension.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>padding</code></strong> :</span></p></td><td>extra space in pixels to put between
<em class="parameter"><code>child</code></em> and its neighbors, over and above the global
amount specified by <em class="parameter"><code>spacing</code></em> in <a class="link" href="class-gtkhbox.html" title="gtk.HBox"><code class="classname">gtk.Box</code></a>. If
<em class="parameter"><code>child</code></em> is a widget at one of the reference ends of
box, then <em class="parameter"><code>padding</code></em> pixels are also put between
<em class="parameter"><code>child</code></em> and the reference edge of
box.</td></tr></tbody></table><p>The <code class="methodname">pack_end</code>() method adds
<em class="parameter"><code>child</code></em> to the box, packed with reference to the end of
the box. The <em class="parameter"><code>child</code></em> is packed after (away from end of)
any other child packed with reference to the end of the box.</p></div><div class="refsect2" title="gtk.Box.pack_start_defaults"><a name="method-gtkbox--pack-start-defaults"></a><h3>gtk.Box.pack_start_defaults</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pack_start_defaults</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>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>widget</code></strong> :</span></p></td><td>the widget to be added to the
box</td></tr></tbody></table><div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">pack_start_defaults</code>() method adds
<em class="parameter"><code>widget</code></em> to the box, packed with reference to the start
of the box. The <em class="parameter"><code>widget</code></em> is packed after any other
child widget packed with reference to the start of box. The parameters for
packing the child widget: expand, fill, and padding are given their default
values, True, True, and 0, respectively.</p></div><div class="refsect2" title="gtk.Box.pack_end_defaults"><a name="method-gtkbox--pack-end-defaults"></a><h3>gtk.Box.pack_end_defaults</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pack_end_defaults</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>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>widget</code></strong> :</span></p></td><td>the widget to be added to the
box</td></tr></tbody></table><div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">pack_end_defaults</code>() method adds
<em class="parameter"><code>widget</code></em> to the box, packed with reference to the end
of the box. The <em class="parameter"><code>widget</code></em> is packed after (away from the
end of) any other child widget packed with reference to the end of the box.
The parameters for packing the child widget: expand, fill, and padding are
given their default values, True, True, and 0, respectively.</p></div><div class="refsect2" title="gtk.Box.set_homogeneous"><a name="method-gtkbox--set-homogeneous"></a><h3>gtk.Box.set_homogeneous</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_homogeneous</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>homogeneous</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>homogeneous</code></strong> :</span></p></td><td>If <code class="literal">True</code> the box is
homogeneous i.e. all children are allocated the same space otherwise the
allocations vary for each child.</td></tr></tbody></table><p>The <code class="methodname">set_homogeneous</code>() method sets the
homogeneous (all children are allocated the same space) property of the
box.</p></div><div class="refsect2" title="gtk.Box.get_homogeneous"><a name="method-gtkbox--get-homogeneous"></a><h3>gtk.Box.get_homogeneous</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_homogeneous</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 box is
homogeneous.</td></tr></tbody></table><p>The <code class="methodname">get_homogeneous</code>() method returns
whether the box is homogeneous (all children are allocated the same space).
See <a class="link" href="class-gtkbox.html#method-gtkbox--set-homogeneous" title="gtk.Box.set_homogeneous"><code class="methodname">gtk.Box.set_homogeneous()</code></a>.</p></div><div class="refsect2" title="gtk.Box.set_spacing"><a name="method-gtkbox--set-spacing"></a><h3>gtk.Box.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 number of pixels to put between
children.</td></tr></tbody></table><p>The <code class="methodname">set_spacing</code>() method sets the
number of pixels to place between children of the box.</p></div><div class="refsect2" title="gtk.Box.get_spacing"><a name="method-gtkbox--get-spacing"></a><h3>gtk.Box.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 in pixels between
children</td></tr></tbody></table><p>The <code class="methodname">get_spacing</code>() method returns the
number of pixels used as padding between children as set by the <a class="link" href="class-gtkbox.html#method-gtkbox--set-spacing" title="gtk.Box.set_spacing"><code class="methodname">set_spacing</code>()</a>.</p></div><div class="refsect2" title="gtk.Box.reorder_child"><a name="method-gtkbox--reorder-child"></a><h3>gtk.Box.reorder_child</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">reorder_child</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>position</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>child</code></strong> :</span></p></td><td>the child widget to move</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>position</code></strong> :</span></p></td><td>the new position for child in the children list
of the box starting from 0. If negative, indicates the end of the
list.</td></tr></tbody></table><p>Moves child to a new position in the list of the box children.
The list contains both widgets packed gtk.PACK_START as well as widgets
packed gtk.PACK_END, in the order that these widgets were added to
box.</p><p>A widget's position in the box children list determines where
the widget is packed into box. A child widget at some position in the list
will be packed just after all other widgets of the same packing type that
appear earlier in the list.</p></div><div class="refsect2" title="gtk.Box.query_child_packing"><a name="method-gtkbox--query-child-packing"></a><h3>gtk.Box.query_child_packing</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">query_child_packing</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child</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>child</code></strong> :</span></p></td><td>the child widget to be queried for its packing
information</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>expand</code></strong> :</span></p></td><td>the child's expand value</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>fill</code></strong> :</span></p></td><td>the child's fill value</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>padding</code></strong> :</span></p></td><td>the child's padding value</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>pack_type</code></strong> :</span></p></td><td>the child's pack_type
value</td></tr></tbody></table><p>The <code class="methodname">query_child_packing</code>() method
returns a tuple containing information about how <em class="parameter"><code>child</code></em>
is packed into the box. The tuple members are: (expand, fill, padding,
pack_type) where: expand and fill are 0 or 1 (corresponding to False or
True); padding is the number of pixels of padding; and pack_type is
gtk.PACK_START or gtk.PACK_END.</p></div><div class="refsect2" title="gtk.Box.set_child_packing"><a name="method-gtkbox--set-child-packing"></a><h3>gtk.Box.set_child_packing</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_child_packing</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>expand</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>fill</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>padding</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pack_type</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>child</code></strong> :</span></p></td><td>the child widget to be queried for its packing
information</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>expand</code></strong> :</span></p></td><td>the child's new expand
value</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>fill</code></strong> :</span></p></td><td>the child's new fill value</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>padding</code></strong> :</span></p></td><td>the child's new padding
value</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>pack_type</code></strong> :</span></p></td><td>the child's new pack_type
value</td></tr></tbody></table></div><p>The <code class="methodname">set_child_packing</code>() method sets the
way child is packed into the box.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gtkborder.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-gtkbuildable.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.Border </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.Buildable</td></tr></table></div></body></html>
|