File: class-gtkbox.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 (125 lines) | stat: -rw-r--r-- 30,700 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
115
116
117
118
119
120
121
122
123
124
125
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gtk.Box</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-gtkborder.html" title="gtk.Border"><link rel="next" href="class-gtkbutton.html" title="gtk.Button"></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-gtkbutton.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtkbox"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>gtk.Box</h2><p>gtk.Box &#8212; an abstract base class for box containers</p></div><div class="refsect1" lang="en"><a name="id2935484"></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 href="class-gtkcontainer.html" title="gtk.Container">gtk.Container</a></span></span>):
<code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkbox.html#method-gtkbox--pack-start" title="gtk.Box.pack_start">pack_start</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>expand</tt></b></span><span class="initializer">=TRUE</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>fill</tt></b></span><span class="initializer">=TRUE</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>padding</tt></b></span><span class="initializer">=0</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkbox.html#method-gtkbox--pack-end" title="gtk.Box.pack_end">pack_end</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>expand</tt></b></span><span class="initializer">=TRUE</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>fill</tt></b></span><span class="initializer">=TRUE</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>padding</tt></b></span><span class="initializer">=0</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a 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"><b class="parameter"><tt>widget</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a 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"><b class="parameter"><tt>widget</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkbox.html#method-gtkbox--set-homogeneous" title="gtk.Box.set_homogeneous">set_homogeneous</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>homogeneous</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a 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 href="class-gtkbox.html#method-gtkbox--set-spacing" title="gtk.Box.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-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 href="class-gtkbox.html#method-gtkbox--reorder-child" title="gtk.Box.reorder_child">reorder_child</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>position</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a 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"><b class="parameter"><tt>child</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a 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"><b class="parameter"><tt>child</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>expand</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>fill</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>padding</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>pack_type</tt></b></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3203365"></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-gtkbox.html" title="gtk.Box">gtk.Box</a>
</pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3117174"></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">"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" lang="en"><a name="id2977501"></a><h2>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><col><col></colgroup><tbody><tr valign="top"><td valign="top">"expand"</td><td valign="top">Read/Write</td><td valign="top">If TRUE 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 TRUE extra space given to the child should be allocated
to the child; if FALSE 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 (gtk.PACK_START) or end (gtk.PACK_END) 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" lang="en"><a name="id2975456"></a><h2>Description</h2><p>The <a href="class-gtkbox.html" title="gtk.Box"><tt class="classname">gtk.Box</tt></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 href="class-gtkbox.html" title="gtk.Box"><tt class="classname">gtk.Box</tt></a> currently has
two derived classes, <a href="class-gtkhbox.html" title="gtk.HBox"><tt class="classname">gtk.HBox</tt></a> and <a href="class-gtkvbox.html" title="gtk.VBox"><tt class="classname">gtk.VBox</tt></a>.</p><p>The rectangular area of a <a href="class-gtkbox.html" title="gtk.Box"><tt class="classname">gtk.Box</tt></a> is organized
into either a single row or a single column of child widgets depending upon
whether the box is of type <a href="class-gtkhbox.html" title="gtk.HBox"><tt class="classname">gtk.HBox</tt></a> or <a href="class-gtkvbox.html" title="gtk.VBox"><tt class="classname">gtk.VBox</tt></a>,
respectively. Thus, all children of a <a href="class-gtkbox.html" title="gtk.Box"><tt class="classname">gtk.Box</tt></a> are allocated
one dimension in common, which is the height of a row, or the width of a
column.</p><p><a href="class-gtkbox.html" title="gtk.Box"><tt class="classname">gtk.Box</tt></a>
uses a notion of packing. Packing refers to adding widgets with reference to
a particular position in a <a href="class-gtkbox.html" title="gtk.Box"><tt class="classname">gtk.Container</tt></a>. For a
<a href="class-gtkbox.html" title="gtk.Box"><tt class="classname">gtk.Box</tt></a>, there
are two reference positions: the start and the end of the box. For a <a href="class-gtkvbox.html" title="gtk.VBox"><tt class="classname">gtk.VBox</tt></a>, the start is
defined as the top of the box and the end is defined as the bottom. For a
<a href="class-gtkhbox.html" title="gtk.HBox"><tt class="classname">gtk.HBox</tt></a> the
start is defined as the left side and the end is defined as the right
side.</p><p>Repeated calls to <a href="class-gtkbox.html#method-gtkbox--pack-start" title="gtk.Box.pack_start"><tt class="methodname">pack_start</tt>()</a> 
pack widgets into a <a href="class-gtkbox.html" title="gtk.Box"><tt class="classname">gtk.Box</tt></a> from start to
end. The <a href="class-gtkbox.html#method-gtkbox--pack-end" title="gtk.Box.pack_end"><tt class="methodname">pack_end</tt>()</a>
method adds widgets from end to start. You may intersperse these calls and
add widgets from both ends of the same <a href="class-gtkbox.html" title="gtk.Box"><tt class="classname">gtk.Box</tt></a>.</p><p>Because <a href="class-gtkbox.html" title="gtk.Box"><tt class="classname">gtk.Box</tt></a> is a <a href="class-gtkcontainer.html" title="gtk.Container"><tt class="classname">gtk.Container</tt></a>,
you may also use <a href="class-gtkcontainer.html#method-gtkcontainer--add" title="gtk.Container.add"><tt class="methodname">add</tt>()</a> to
insert widgets into the box, and they will be packed as if with the <a href="class-gtkbox.html#method-gtkbox--pack-start-defaults" title="gtk.Box.pack_start_defaults"><tt class="methodname">pack_start</tt>()</a> 
method. Use <a href="class-gtkcontainer.html#method-gtkcontainer--remove" title="gtk.Container.remove"><tt class="methodname">remove</tt>()</a> 
to remove widgets from the <a href="class-gtkbox.html" title="gtk.Box"><tt class="classname">gtk.Box</tt></a>.</p><p>The <a href="class-gtkbox.html#method-gtkbox--set-homogeneous" title="gtk.Box.set_homogeneous"><tt class="methodname">set_homogeneous</tt>()</a> 
method specifies whether or not all children of the <a href="class-gtkbox.html" title="gtk.Box"><tt class="classname">gtk.Box</tt></a> are forced to
get the same amount of space.</p><p>The <a href="class-gtkbox.html#method-gtkbox--set-spacing" title="gtk.Box.set_spacing"><tt class="methodname">set_spacing</tt>()</a> 
method determines how much space will be minimally placed between all
children in the <a href="class-gtkbox.html" title="gtk.Box"><tt class="classname">gtk.Box</tt></a>.</p><p>The <a href="class-gtkbox.html#method-gtkbox--reorder-child" title="gtk.Box.reorder_child"><tt class="methodname">reorder_child</tt>()</a> 
method moves a <a href="class-gtkbox.html" title="gtk.Box"><tt class="classname">gtk.Box</tt></a> child to a
different place in the box.</p><p>The <a href="class-gtkbox.html#method-gtkbox--set-child-packing" title="gtk.Box.set_child_packing"><tt class="methodname">set_child_packing</tt>()</a> 
method resets the expand, fill, and padding attributes of any <a href="class-gtkbox.html" title="gtk.Box"><tt class="classname">gtk.Box</tt></a> child. Use the
<a href="class-gtkbox.html#method-gtkbox--query-child-packing" title="gtk.Box.query_child_packing"><tt class="methodname">query_child_packing</tt>()</a> 
to query these properties.</p></div><div class="refsect1" lang="en"><a name="id2987017"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtkbox--pack-start"></a><h3>gtk.Box.pack_start</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pack_start</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>expand</tt></b></span><span class="initializer">=TRUE</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>fill</tt></b></span><span class="initializer">=TRUE</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>padding</tt></b></span><span class="initializer">=0</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>child</tt></b>:</span></td><td>the widget to be added to the
box</td></tr><tr><td><span class="term"><b class="parameter"><tt>expand</tt></b>:</span></td><td>TRUE if <i class="parameter"><tt>child</tt></i> 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><span class="term"><b class="parameter"><tt>fill</tt></b>:</span></td><td>TRUE if space given to
<i class="parameter"><tt>child</tt></i> by the <i class="parameter"><tt>expand</tt></i> option is
actually allocated to <i class="parameter"><tt>child</tt></i>, rather than just padding
it. This parameter has no effect if <i class="parameter"><tt>expand</tt></i> is set to
FALSE. A child is always allocated the full height of a <a href="class-gtkhbox.html" title="gtk.HBox"><tt class="classname">gtk.HBox</tt></a> and the full
width of a <a href="class-gtkvbox.html" title="gtk.VBox"><tt class="classname">gtk.VBox</tt></a>. This option
affects the other dimension.</td></tr><tr><td><span class="term"><b class="parameter"><tt>padding</tt></b>:</span></td><td>extra space in pixels to put between
<i class="parameter"><tt>child</tt></i> and its neighbors, over and above the global
amount specified by <i class="parameter"><tt>spacing</tt></i> in <a href="class-gtkhbox.html" title="gtk.HBox"><tt class="classname">gtk.Box</tt></a>. If
<i class="parameter"><tt>child</tt></i> is a widget at one of the reference ends of
box, then <i class="parameter"><tt>padding</tt></i> pixels are also put between
<i class="parameter"><tt>child</tt></i> and the reference edge of
box.</td></tr></tbody></table><p>The <tt class="methodname">pack_start</tt>() method adds
<i class="parameter"><tt>child</tt></i> to the box, packed with reference to the start
of box. The <i class="parameter"><tt>child</tt></i> is packed after any other child
packed with reference to the start of box. </p></div><div class="refsect2" lang="en"><a name="method-gtkbox--pack-end"></a><h3>gtk.Box.pack_end</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pack_end</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>expand</tt></b></span><span class="initializer">=TRUE</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>fill</tt></b></span><span class="initializer">=TRUE</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>padding</tt></b></span><span class="initializer">=0</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>child</tt></b>:</span></td><td>the widget to be added to the
box</td></tr><tr><td><span class="term"><b class="parameter"><tt>expand</tt></b>:</span></td><td>TRUE if <i class="parameter"><tt>child</tt></i> 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><span class="term"><b class="parameter"><tt>fill</tt></b>:</span></td><td>TRUE if space given to
<i class="parameter"><tt>child</tt></i> by the <i class="parameter"><tt>expand</tt></i> option is
actually allocated to <i class="parameter"><tt>child</tt></i>, rather than just padding
it. This parameter has no effect if <i class="parameter"><tt>expand</tt></i> is set to
FALSE. A child is always allocated the full height of a <a href="class-gtkhbox.html" title="gtk.HBox"><tt class="classname">gtk.HBox</tt></a> and the full
width of a <a href="class-gtkvbox.html" title="gtk.VBox"><tt class="classname">gtk.VBox</tt></a>. This option
affects the other dimension.</td></tr><tr><td><span class="term"><b class="parameter"><tt>padding</tt></b>:</span></td><td>extra space in pixels to put between
<i class="parameter"><tt>child</tt></i> and its neighbors, over and above the global
amount specified by <i class="parameter"><tt>spacing</tt></i> in <a href="class-gtkhbox.html" title="gtk.HBox"><tt class="classname">gtk.Box</tt></a>. If
<i class="parameter"><tt>child</tt></i> is a widget at one of the reference ends of
box, then <i class="parameter"><tt>padding</tt></i> pixels are also put between
<i class="parameter"><tt>child</tt></i> and the reference edge of
box.</td></tr></tbody></table><p>The <tt class="methodname">pack_end</tt>() method adds
<i class="parameter"><tt>child</tt></i> to the box, packed with reference to the end of
the box. The <i class="parameter"><tt>child</tt></i> is packed after (away from end of)
any other child packed with reference to the end of the box.</p></div><div class="refsect2" lang="en"><a name="method-gtkbox--pack-start-defaults"></a><h3>gtk.Box.pack_start_defaults</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pack_start_defaults</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>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>widget</tt></b>:</span></td><td>the widget to be added to the
box</td></tr></tbody></table><div class="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 <tt class="methodname">pack_start_defaults</tt>() method adds
<i class="parameter"><tt>widget</tt></i> to the box, packed with reference to the start
of the box. The <i class="parameter"><tt>widget</tt></i> 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" lang="en"><a name="method-gtkbox--pack-end-defaults"></a><h3>gtk.Box.pack_end_defaults</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pack_end_defaults</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>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>widget</tt></b>:</span></td><td>the widget to be added to the
box</td></tr></tbody></table><div class="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 <tt class="methodname">pack_end_defaults</tt>() method adds
<i class="parameter"><tt>widget</tt></i> to the box, packed with reference to the end
of the box. The <i class="parameter"><tt>widget</tt></i> 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" lang="en"><a name="method-gtkbox--set-homogeneous"></a><h3>gtk.Box.set_homogeneous</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_homogeneous</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>homogeneous</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>homogeneous</tt></b>:</span></td><td>If <tt class="literal">TRUE</tt> 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 <tt class="methodname">set_homogeneous</tt>() method sets the
homogeneous (all children are allocated the same space) property of the
box.</p></div><div class="refsect2" lang="en"><a name="method-gtkbox--get-homogeneous"></a><h3>gtk.Box.get_homogeneous</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_homogeneous</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 box is
homogeneous.</td></tr></tbody></table><p>The <tt class="methodname">get_homogeneous</tt>() method returns
whether the box is homogeneous (all children are allocated the same space).
See <a href="class-gtkbox.html#method-gtkbox--set-homogeneous" title="gtk.Box.set_homogeneous"><tt class="methodname">gtk.Box.set_homogeneous()</tt></a>.</p></div><div class="refsect2" lang="en"><a name="method-gtkbox--set-spacing"></a><h3>gtk.Box.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 number of pixels to put between
children.</td></tr></tbody></table><p>The <tt class="methodname">set_spacing</tt>() method sets the
number of pixels to place between children of the box.</p></div><div class="refsect2" lang="en"><a name="method-gtkbox--get-spacing"></a><h3>gtk.Box.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 in pixels between
children</td></tr></tbody></table><p>The <tt class="methodname">get_spacing</tt>() method returns the
number of pixels used as padding between children as set by the <a href="class-gtkbox.html#method-gtkbox--set-spacing" title="gtk.Box.set_spacing"><tt class="methodname">set_spacing</tt>()</a>.</p></div><div class="refsect2" lang="en"><a name="method-gtkbox--reorder-child"></a><h3>gtk.Box.reorder_child</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">reorder_child</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>position</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>child</tt></b>:</span></td><td>the child widget to move</td></tr><tr><td><span class="term"><b class="parameter"><tt>position</tt></b>:</span></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" lang="en"><a name="method-gtkbox--query-child-packing"></a><h3>gtk.Box.query_child_packing</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">query_child_packing</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</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>child</tt></b>:</span></td><td>the child widget to be queried for its packing
information</td></tr><tr><td><span class="term"><b class="parameter"><tt>expand</tt></b>:</span></td><td>the child's expand value</td></tr><tr><td><span class="term"><b class="parameter"><tt>fill</tt></b>:</span></td><td>the child's fill value</td></tr><tr><td><span class="term"><b class="parameter"><tt>padding</tt></b>:</span></td><td>the child's padding value</td></tr><tr><td><span class="term"><b class="parameter"><tt>pack_type</tt></b>:</span></td><td>the child's pack_type
value</td></tr></tbody></table><p>The <tt class="methodname">query_child_packing</tt>() method
returns a tuple containing information about how <i class="parameter"><tt>child</tt></i>
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" lang="en"><a name="method-gtkbox--set-child-packing"></a><h3>gtk.Box.set_child_packing</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_child_packing</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>expand</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>fill</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>padding</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>pack_type</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>child</tt></b>:</span></td><td>the child widget to be queried for its packing
information</td></tr><tr><td><span class="term"><b class="parameter"><tt>expand</tt></b>:</span></td><td>the child's new expand
value</td></tr><tr><td><span class="term"><b class="parameter"><tt>fill</tt></b>:</span></td><td>the child's new fill value</td></tr><tr><td><span class="term"><b class="parameter"><tt>padding</tt></b>:</span></td><td>the child's new padding
value</td></tr><tr><td><span class="term"><b class="parameter"><tt>pack_type</tt></b>:</span></td><td>the child's new pack_type
value</td></tr></tbody></table></div><p>The <tt class="methodname">set_child_packing</tt>() 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-gtkbutton.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.Button</td></tr></table></div></body></html>