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 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gtk.TreeViewColumn</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-gtktreeview.html" title="gtk.TreeView"><link rel="next" href="class-gtkuimanager.html" title="gtk.UIManager"></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.TreeViewColumn</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtktreeview.html">Prev</a></td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"><a accesskey="n" href="class-gtkuimanager.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtktreeviewcolumn"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>gtk.TreeViewColumn</h2><p>gtk.TreeViewColumn — a visible column in a <a href="class-gtktreeview.html" title="gtk.TreeView"><tt class="classname">gtk.TreeView</tt></a>
widget</p></div><div class="refsect1" lang="en"><a name="id3608041"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.TreeViewColumn</span></span>(<span class="ooclass"><span class="classname"><a href="class-gtkobject.html" title="gtk.Object">gtk.Object</a></span></span>):
<code class="constructorsynopsis"> <span class="methodname"><a href="class-gtktreeviewcolumn.html#constructor-gtktreeviewcolumn" title="Constructor">gtk.TreeViewColumn</a></span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>title</tt></i></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>cell_renderer</tt></i></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--pack-start" title="gtk.TreeViewColumn.pack_start">pack_start</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>cell</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>expand</tt></b></span><span class="initializer">=TRUE</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--pack-end" title="gtk.TreeViewColumn.pack_end">pack_end</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>cell</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>expand</tt></b></span><span class="initializer">=TRUE</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--clear" title="gtk.TreeViewColumn.clear">clear</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--get-cell-renderers" title="gtk.TreeViewColumn.get_cell_renderers">get_cell_renderers</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--add-attribute" title="gtk.TreeViewColumn.add_attribute">add_attribute</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>cell_renderer</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>attribute</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>column</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-attributes" title="gtk.TreeViewColumn.set_attributes">set_attributes</a></span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>cell_renderer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-cell-data-func" title="gtk.TreeViewColumn.set_cell_data_func">set_cell_data_func</a></span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>cell_renderer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>func</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>func_data</tt></i></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--clear-attributes" title="gtk.TreeViewColumn.clear_attributes">clear_attributes</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>cell_renderer</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-spacing" title="gtk.TreeViewColumn.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-gtktreeviewcolumn.html#method-gtktreeviewcolumn--get-spacing" title="gtk.TreeViewColumn.get_spacing">get_spacing</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-visible" title="gtk.TreeViewColumn.set_visible">set_visible</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>visible</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--get-visible" title="gtk.TreeViewColumn.get_visible">get_visible</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-resizable" title="gtk.TreeViewColumn.set_resizable">set_resizable</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>resizable</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--get-resizable" title="gtk.TreeViewColumn.get_resizable">get_resizable</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-sizing" title="gtk.TreeViewColumn.set_sizing">set_sizing</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>type</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--get-sizing" title="gtk.TreeViewColumn.get_sizing">get_sizing</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--get-width" title="gtk.TreeViewColumn.get_width">get_width</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--get-fixed-width" title="gtk.TreeViewColumn.get_fixed_width">get_fixed_width</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-fixed-width" title="gtk.TreeViewColumn.set_fixed_width">set_fixed_width</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>fixed_width</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-min-width" title="gtk.TreeViewColumn.set_min_width">set_min_width</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>min_width</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--get-min-width" title="gtk.TreeViewColumn.get_min_width">get_min_width</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-max-width" title="gtk.TreeViewColumn.set_max_width">set_max_width</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>max_width</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--get-max-width" title="gtk.TreeViewColumn.get_max_width">get_max_width</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--clicked" title="gtk.TreeViewColumn.clicked">clicked</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-title" title="gtk.TreeViewColumn.set_title">set_title</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>title</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--get-title" title="gtk.TreeViewColumn.get_title">get_title</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-expand" title="gtk.TreeViewColumn.set_expand">set_expand</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>expand</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--get-expand" title="gtk.TreeViewColumn.get_expand">get_expand</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-clickable" title="gtk.TreeViewColumn.set_clickable">set_clickable</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>active</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--get-clickable" title="gtk.TreeViewColumn.get_clickable">get_clickable</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-widget" title="gtk.TreeViewColumn.set_widget">set_widget</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-gtktreeviewcolumn.html#method-gtktreeviewcolumn--get-widget" title="gtk.TreeViewColumn.get_widget">get_widget</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-alignment" title="gtk.TreeViewColumn.set_alignment">set_alignment</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>xalign</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--get-alignment" title="gtk.TreeViewColumn.get_alignment">get_alignment</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-reorderable" title="gtk.TreeViewColumn.set_reorderable">set_reorderable</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>reorderable</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--get-reorderable" title="gtk.TreeViewColumn.get_reorderable">get_reorderable</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-sort-column-id" title="gtk.TreeViewColumn.set_sort_column_id">set_sort_column_id</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>sort_column_id</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--get-sort-column-id" title="gtk.TreeViewColumn.get_sort_column_id">get_sort_column_id</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-sort-indicator" title="gtk.TreeViewColumn.set_sort_indicator">set_sort_indicator</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>setting</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--get-sort-indicator" title="gtk.TreeViewColumn.get_sort_indicator">get_sort_indicator</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-sort-order" title="gtk.TreeViewColumn.set_sort_order">set_sort_order</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>order</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--get-sort-order" title="gtk.TreeViewColumn.get_sort_order">get_sort_order</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--cell-set-cell-data" title="gtk.TreeViewColumn.cell_set_cell_data">cell_set_cell_data</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>tree_model</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>is_expander</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>is_expanded</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--cell-get-size" title="gtk.TreeViewColumn.cell_get_size">cell_get_size</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--cell-is-visible" title="gtk.TreeViewColumn.cell_is_visible">cell_is_visible</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--focus-cell" title="gtk.TreeViewColumn.focus_cell">focus_cell</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>cell</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--cell-get-position" title="gtk.TreeViewColumn.cell_get_position">cell_get_position</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>cell_renderer</tt></b></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3609045"></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-gtktreeviewcolumn.html" title="gtk.TreeViewColumn">gtk.TreeViewColumn</a>
</pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3609075"></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">"alignment"</td><td valign="top">Read-Write</td><td valign="top">The alignment of the column header text or
widget</td></tr><tr valign="top"><td valign="top">"clickable"</td><td valign="top">Read-Write</td><td valign="top">If <tt class="literal">TRUE</tt>, the header can be
clicked</td></tr><tr valign="top"><td valign="top">"expand"</td><td valign="top">Read-Write</td><td valign="top">If <tt class="literal">TRUE</tt>, the column can expand to
take extra available space. Available in GTK+ 2.4 and above</td></tr><tr valign="top"><td valign="top">"fixed-width"</td><td valign="top">Read-Write</td><td valign="top">The current fixed width of the column</td></tr><tr valign="top"><td valign="top">"max-width"</td><td valign="top">Read-Write</td><td valign="top">The maximum allowed width of the column</td></tr><tr valign="top"><td valign="top">"min-width"</td><td valign="top">Read-Write</td><td valign="top">The minimum allowed width of the column</td></tr><tr valign="top"><td valign="top">"reorderable"</td><td valign="top">Read-Write</td><td valign="top">If <tt class="literal">TRUE</tt>, the column can be reordered
around the headers</td></tr><tr valign="top"><td valign="top">"resizable"</td><td valign="top">Read-Write</td><td valign="top">If <tt class="literal">TRUE</tt>, the user can resize the
column</td></tr><tr valign="top"><td valign="top">"sizing"</td><td valign="top">Read-Write</td><td valign="top">The resize mode of the column:
<tt class="literal">gtk.TREE_VIEW_COLUMN_GROW_ONLY</tt>,
<tt class="literal">gtk.TREE_VIEW_COLUMN_AUTOSIZE</tt> or
<tt class="literal">gtk.TREE_VIEW_COLUMN_FIXED</tt></td></tr><tr valign="top"><td valign="top">"sort-indicator"</td><td valign="top">Read-Write</td><td valign="top">If <tt class="literal">TRUE</tt>, how a sort
indicator</td></tr><tr valign="top"><td valign="top">"sort-order"</td><td valign="top">Read-Write</td><td valign="top">The sort direction the sort indicator should indicate:
<tt class="literal">gtk.SORT_ASCENDING</tt> or
<tt class="literal">gtk.SORT_DESCENDING</tt></td></tr><tr valign="top"><td valign="top">"title"</td><td valign="top">Read-Write</td><td valign="top">The title to appear in the column header</td></tr><tr valign="top"><td valign="top">"visible"</td><td valign="top">Read-Write</td><td valign="top">If <tt class="literal">TRUE</tt>, display the column</td></tr><tr valign="top"><td valign="top">"widget"</td><td valign="top">Read-Write</td><td valign="top">The widget to put in the column header button instead
of the column title</td></tr><tr valign="top"><td valign="top">"width"</td><td valign="top">Read</td><td valign="top">The current width of the column</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="id3609434"></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-gtktreeviewcolumn.html#signal-gtktreeviewcolumn--clicked" title='The "clicked" gtk.TreeViewColumn Signal'>clicked</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>treeviewcolumn</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="id3609486"></a><h2>Description</h2><p>The <a href="class-gtktreeviewcolumn.html" title="gtk.TreeViewColumn"><tt class="classname">gtk.TreeViewColumn</tt></a>
object is a visible column in a <a href="class-gtktreeview.html" title="gtk.TreeView"><tt class="classname">gtk.TreeView</tt></a>
widget. A <a href="class-gtktreeviewcolumn.html" title="gtk.TreeViewColumn"><tt class="classname">gtk.TreeViewColumn</tt></a>
manages the display of the header and the cells using a <a href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><tt class="classname">gtk.CellRenderer</tt></a>.</p><p>In PyGTK 2.4 <a href="class-gtktreeviewcolumn.html" title="gtk.TreeViewColumn"><tt class="classname">gtk.TreeViewColumn</tt></a>
implementes the <a href="class-gtkcelllayout.html" title="gtk.CellLayout"><tt class="classname">gtk.CellLayout</tt></a>
interface.</p></div><div class="refsect1" lang="en"><a name="constructor-gtktreeviewcolumn"></a><h2>Constructor</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.TreeViewColumn</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>title</tt></i></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>cell_renderer</tt></i></span><span class="initializer">=None</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>title</tt></i>:</span></td><td>the header title string</td></tr><tr><td><span class="term"><i class="parameter"><tt>cell_renderer</tt></i>:</span></td><td>a <a href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><tt class="classname">gtk.CellRenderer</tt></a></td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>zero or more <tt class="literal">attribute=column</tt>
pairs</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>A newly created <a href="class-gtktreeviewcolumn.html" title="gtk.TreeViewColumn"><tt class="classname">gtk.TreeViewColumn</tt></a>.</td></tr></tbody></table><p>Creates a new <a href="class-gtktreeviewcolumn.html" title="gtk.TreeViewColumn"><tt class="classname">gtk.TreeViewColumn</tt></a>
with the header string specified by <i class="parameter"><tt>title</tt></i> and using
the <a href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><tt class="classname">gtk.CellRenderer</tt></a>
specified by <i class="parameter"><tt>cell_renderer</tt></i>. Zero or more
<tt class="literal">attribute=column</tt> pairs may be added to specify from which
tree model column to retrieve the attribute value. For example:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
column = gtk.TreeViewColumn('Column Title', cell_renderer, text=0, foreground=1)
</pre></td></tr></table><p>will retrieve the 'text' attribute values for the cell renderer
from column 0 in the treemodel and the 'foreground' attribute values from
column 1. See the <a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--add-attribute" title="gtk.TreeViewColumn.add_attribute"><tt class="methodname">add_attribute</tt>()</a>
method for more detail.</p></div><div class="refsect1" lang="en"><a name="id3609727"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--pack-start"></a><h3>gtk.TreeViewColumn.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>cell</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>expand</tt></b></span><span class="initializer">=TRUE</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>cell</tt></b>:</span></td><td>a <a href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><tt class="classname">gtk.CellRenderer</tt></a>.</td></tr><tr><td><span class="term"><b class="parameter"><tt>expand</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt>
<i class="parameter"><tt>cell</tt></i> is to be given the extra space allocated to the
cell box.</td></tr></tbody></table><p>The <tt class="methodname">pack_start</tt>() method packs the <a href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><tt class="classname">gtk.CellRenderer</tt></a>
specified by <i class="parameter"><tt>cell</tt></i> into the beginning column. If
<i class="parameter"><tt>expand</tt></i> is <tt class="literal">TRUE</tt>, then the
<i class="parameter"><tt>cell</tt></i> is allocated a share of all available space that
the column is allocated. Note <i class="parameter"><tt>expand</tt></i> defaults to
<tt class="literal">TRUE</tt> in PyGTK 2.4.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--pack-end"></a><h3>gtk.TreeViewColumn.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>cell</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>expand</tt></b></span><span class="initializer">=TRUE</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>cell</tt></b>:</span></td><td>a <a href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><tt class="classname">gtk.CellRenderer</tt></a>.</td></tr><tr><td><span class="term"><b class="parameter"><tt>expand</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt>
<i class="parameter"><tt>cell</tt></i> is to be given the extra space allocated to the
cell box.</td></tr></tbody></table><p>The <tt class="methodname">pack_end</tt>() method packs the <a href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><tt class="classname">gtk.CellRenderer</tt></a>
specified by <i class="parameter"><tt>cell</tt></i> into the column. If
<i class="parameter"><tt>expand</tt></i> is <tt class="literal">TRUE</tt>, then the
<i class="parameter"><tt>cell</tt></i> is allocated a share of all available space that
the column is allocated. Note <i class="parameter"><tt>expand</tt></i> defaults to
<tt class="literal">TRUE</tt> in PyGTK 2.4.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--clear"></a><h3>gtk.TreeViewColumn.clear</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">clear</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><p>The <tt class="methodname">clear</tt>() method unsets all the
mappings on all renderers on the column.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--get-cell-renderers"></a><h3>gtk.TreeViewColumn.get_cell_renderers</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_cell_renderers</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>a list of <a href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><tt class="classname">gtk.CellRenderer</tt></a>
objects</td></tr></tbody></table><p>The <tt class="methodname">get_cell_renderers</tt>() method returns
a list containing all the cell renderers in the column, in no particular
order.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--add-attribute"></a><h3>gtk.TreeViewColumn.add_attribute</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">add_attribute</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>cell_renderer</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>attribute</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>column</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>cell_renderer</tt></b>:</span></td><td>the <a href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><tt class="classname">gtk.CellRenderer</tt></a>
to set attributes on</td></tr><tr><td><span class="term"><b class="parameter"><tt>attribute</tt></b>:</span></td><td>an attribute on the
renderer</td></tr><tr><td><span class="term"><b class="parameter"><tt>column</tt></b>:</span></td><td>the column position on the model to get the
attribute from.</td></tr></tbody></table><p>The <tt class="methodname">add_attribute</tt>() method adds an
attribute mapping to the list in the tree column. The
<i class="parameter"><tt>column</tt></i> is the column of the tree model to get a value
from, and the <i class="parameter"><tt>attribute</tt></i> is the parameter on
<i class="parameter"><tt>cell_renderer</tt></i> to be set from the value. So for
example if column 2 of the model contains strings, you could have the "text"
attribute of a <a href="class-gtkcellrenderertext.html" title="gtk.CellRendererText"><tt class="classname">gtk.CellRendererText</tt></a>
get its values from column 2.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--set-attributes"></a><h3>gtk.TreeViewColumn.set_attributes</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_attributes</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>cell_renderer</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>cell_renderer</tt></i>:</span></td><td>the <a href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><tt class="classname">gtk.CellRenderer</tt></a>
we're setting the attributes of</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>zero or more
<tt class="literal">attribute=column</tt> pairs</td></tr></tbody></table><p>The <tt class="methodname">set_attributes</tt>() method sets the
attribute locations of the <a href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><tt class="classname">gtk.CellRenderer</tt></a>
specified by <i class="parameter"><tt>cell_renderer</tt></i> using the
<tt class="literal">attribute=column</tt> pairs (e.g. text=0, foreground=1). See
the <a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--add-attribute" title="gtk.TreeViewColumn.add_attribute"><tt class="methodname">add_attribute</tt>()</a>
method for more detail. All existing cell attributes are removed, and
replaced with the new attributes.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--set-cell-data-func"></a><h3>gtk.TreeViewColumn.set_cell_data_func</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_cell_data_func</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>cell_renderer</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>func</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>func_data</tt></i></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"><i class="parameter"><tt>cell_renderer</tt></i>:</span></td><td>a <a href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><tt class="classname">gtk.CellRenderer</tt></a></td></tr><tr><td><span class="term"><i class="parameter"><tt>func</tt></i>:</span></td><td>the function or method to
use.</td></tr><tr><td><span class="term"><i class="parameter"><tt>func_data</tt></i>:</span></td><td>the user data to pass when calling
<i class="parameter"><tt>func</tt></i>.</td></tr></tbody></table><p>The <tt class="methodname">set_cell_data_func</tt>() method sets
the data function (or method) to use for the column <a href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><tt class="classname">gtk.CellRenderer</tt></a>
specified by <i class="parameter"><tt>cell_renderer</tt></i>. This function (or method)
is used instead of the standard attribute mappings for setting the column
values, and should set the attributes of the cell renderer as appropriate.
<i class="parameter"><tt>func</tt></i> may be <tt class="literal">None</tt> to remove the
current data function. The signature of <i class="parameter"><tt>func</tt></i>
is:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
<code class="methodsynopsis"> def <span class="methodname">celldatafunction</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>column</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>cell</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>model</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>iter</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_data</tt></i></span></span>)</code><br>
<code class="methodsynopsis"> def <span class="methodname">celldatamethod</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>self</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>column</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>cell</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>model</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>iter</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_data</tt></i></span></span>)</code>
</pre></td></tr></table><p>where <i class="parameter"><tt>column</tt></i> is the <a href="class-gtktreeviewcolumn.html" title="gtk.TreeViewColumn"><tt class="classname">gtk.TreeViewColumn</tt></a>
in the treeview, <i class="parameter"><tt>cell</tt></i> is the <a href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><tt class="classname">gtk.CellRenderer</tt></a>
for <i class="parameter"><tt>column</tt></i>, <i class="parameter"><tt>model</tt></i> is the <a href="class-gtktreemodel.html" title="gtk.TreeModel"><tt class="classname">gtk.TreeModel</tt></a> for
the treeview and <i class="parameter"><tt>iter</tt></i> is the <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>
pointing at the row.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--clear-attributes"></a><h3>gtk.TreeViewColumn.clear_attributes</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">clear_attributes</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>cell_renderer</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>cell_renderer</tt></b>:</span></td><td>a <a href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><tt class="classname">gtk.CellRenderer</tt></a>
to clear the attribute mapping on.</td></tr></tbody></table><p>The <tt class="methodname">clear_attributes</tt>() method clears
all existing attributes previously set with the <a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-attributes" title="gtk.TreeViewColumn.set_attributes"><tt class="methodname">set_attributes</tt>()</a>
method.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--set-spacing"></a><h3>gtk.TreeViewColumn.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 cell renderers in
pixels.</td></tr></tbody></table><p>The <tt class="methodname">set_spacing</tt>() method sets the
spacing field of the treeview column, which is the number of pixels to place
between cell renderers packed into it.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--get-spacing"></a><h3>gtk.TreeViewColumn.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 of the treeview
column.</td></tr></tbody></table><p>The <tt class="methodname">get_spacing</tt>() method returns the
spacing of the treeview column.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--set-visible"></a><h3>gtk.TreeViewColumn.set_visible</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_visible</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>visible</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>visible</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt> the treeview column
is visible.</td></tr></tbody></table><p>The <tt class="methodname">set_visible</tt>() method sets the
"visible" property to the value of <i class="parameter"><tt>visible</tt></i>. If
<i class="parameter"><tt>visible</tt></i> is <tt class="literal">TRUE</tt> the treeview
column is visible</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--get-visible"></a><h3>gtk.TreeViewColumn.get_visible</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_visible</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 column is
visible</td></tr></tbody></table><p>The <tt class="methodname">get_visible</tt>() method returns the
value of the "visible" property. If "visible" is <tt class="literal">TRUE</tt> the
treeview column is visible.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--set-resizable"></a><h3>gtk.TreeViewColumn.set_resizable</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_resizable</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>resizable</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>resizable</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt>, the column can be
resized</td></tr></tbody></table><p>The <tt class="methodname">set_resizable</tt>() method sets the
"resizable" property to the value of <i class="parameter"><tt>resizable</tt></i>. If
<i class="parameter"><tt>resizable</tt></i> is <tt class="literal">TRUE</tt> the user can
explicitly resize the column by grabbing the outer edge of the column
button. If <i class="parameter"><tt>resizable</tt></i> is <tt class="literal">TRUE</tt> and
the sizing mode of the column is
<tt class="literal">gtk.TREE_VIEW_COLUMN_AUTOSIZE</tt>, the sizing mode is changed
to <tt class="literal">gtk.TREE_VIEW_COLUMN_GROW_ONLY</tt>.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--get-resizable"></a><h3>gtk.TreeViewColumn.get_resizable</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_resizable</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 treeview column
can be resized.</td></tr></tbody></table><p>The <tt class="methodname">get_resizable</tt>() method returns the
value of the "resizable" property. If "resizable" is
<tt class="literal">TRUE</tt>, the treeview column can be resized by the
user.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--set-sizing"></a><h3>gtk.TreeViewColumn.set_sizing</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_sizing</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>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>type</tt></b>:</span></td><td>The treeview column sizing:
<tt class="literal">gtk.TREE_VIEW_COLUMN_GROW_ONLY</tt>,
<tt class="literal">gtk.TREE_VIEW_COLUMN_AUTOSIZE</tt> or
<tt class="literal">gtk.TREE_VIEW_COLUMN_FIXED</tt>.</td></tr></tbody></table><p>The <tt class="methodname">set_sizing</tt>() method sets the
"sizing" property to the value of <i class="parameter"><tt>type</tt></i>. The value of
type must be one of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><tt class="literal">gtk.TREE_VIEW_COLUMN_GROW_ONLY</tt></span></td><td>Columns only get bigger in reaction to changes in the
model</td></tr><tr><td><span class="term"><tt class="literal">gtk.TREE_VIEW_COLUMN_AUTOSIZE</tt></span></td><td>Columns resize to be the optimal size every time the
model changes.</td></tr><tr><td><span class="term"><tt class="literal">gtk.TREE_VIEW_COLUMN_FIXED</tt></span></td><td>Columns are a fixed numbers of pixels wide.</td></tr></tbody></table><p></p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--get-sizing"></a><h3>gtk.TreeViewColumn.get_sizing</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_sizing</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 treeview column sizing
type.</td></tr></tbody></table><p>The <tt class="methodname">get_sizing</tt>() method returns the
value of the "sizing" property that contains the current type of the
treeview column sizing mode. See the <a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-sizing" title="gtk.TreeViewColumn.set_sizing"><tt class="methodname">set_sizing</tt>()</a>
method for more detail.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--get-width"></a><h3>gtk.TreeViewColumn.get_width</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_width</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 current width of the treeview
column.</td></tr></tbody></table><p>The <tt class="methodname">get_width</tt>() method returns the
value of the "width" property that contains the current size of the treeview
column in pixels.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--get-fixed-width"></a><h3>gtk.TreeViewColumn.get_fixed_width</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_fixed_width</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 fixed width of the treeview
column</td></tr></tbody></table><p>The <tt class="methodname">get_fixed_width</tt>() method returns
the value of the "fixed-width" property that contains the fixed width of the
treeview column i.e. the width of the treeview column only if the sizing
type is <tt class="literal">gtk.TREE_VIEW_COLUMN_FIXED</tt>.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--set-fixed-width"></a><h3>gtk.TreeViewColumn.set_fixed_width</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_fixed_width</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>fixed_width</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>fixed_width</tt></b>:</span></td><td>the size to set the treeview column to. Must be
greater than 0.</td></tr></tbody></table><p>The <tt class="methodname">set_fixed_width</tt>() method sets the
"fixed-width" property to the value of <i class="parameter"><tt>fixed_width</tt></i>.
The value of <i class="parameter"><tt>fixed_width</tt></i> is the size of the column in
pixels. This is meaningful only if the sizing type is
<tt class="literal">gtk.TREE_VIEW_COLUMN_FIXED</tt>. The size of the column is
clamped to the min and max width for the column. Please note that the min
and max width of the column doesn't actually affect the "fixed_width"
property of the widget, just the actual size when displayed.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--set-min-width"></a><h3>gtk.TreeViewColumn.set_min_width</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_min_width</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>min_width</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>min_width</tt></b>:</span></td><td>the minimum width of the treeview column in
pixels, or -1.</td></tr></tbody></table><p>The <tt class="methodname">set_min_width</tt>() method sets the
"min-width" property to the value of <i class="parameter"><tt>min_width</tt></i>. The
value of <i class="parameter"><tt>min_width</tt></i> is the minimum width of the
treeview column. If <i class="parameter"><tt>min_width</tt></i> is -1, then the
minimum width is unset.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--get-min-width"></a><h3>gtk.TreeViewColumn.get_min_width</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_min_width</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 minimum width of the treeview
column.</td></tr></tbody></table><p>The <tt class="methodname">get_min_width</tt>() method returns the
value of the "min-width" property that contains the minimum width in pixels
of the treeview column, or -1 if no minimum width is set.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--set-max-width"></a><h3>gtk.TreeViewColumn.set_max_width</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_max_width</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>max_width</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>max_width</tt></b>:</span></td><td>the maximum width of the column in pixels, or
-1.</td></tr></tbody></table><p>The <tt class="methodname">set_max_width</tt>() method sets the
"max-width" property to the value of <i class="parameter"><tt>max_width</tt></i>. The
value of <i class="parameter"><tt>max_width</tt></i> becomes the maximum width of the
treeview column. If <i class="parameter"><tt>max_width</tt></i> is -1, then the
maximum width is unset. Note, the column can actually be wider than max
width if it's the last column in a view. In this case, the column expands to
fill any extra space.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--get-max-width"></a><h3>gtk.TreeViewColumn.get_max_width</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_max_width</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 maximum width of the treeview
column.</td></tr></tbody></table><p>The <tt class="methodname">get_max_width</tt>() method returns the
value of the "max-width" property that contains the maximum width in pixels
of the treeview column, or -1 if no maximum width is set.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--clicked"></a><h3>gtk.TreeViewColumn.clicked</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">clicked</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><p>The <tt class="methodname">clicked</tt>() method emits the
"clicked" signal on the treeview column. The treeview column must be
clickable.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--set-title"></a><h3>gtk.TreeViewColumn.set_title</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_title</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>title</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>title</tt></b>:</span></td><td>the title string of the treeview
column.</td></tr></tbody></table><p>The <tt class="methodname">set_title</tt>() method sets the "title"
property to the value of <i class="parameter"><tt>title</tt></i>. The "title" property
contains the string that is used to set the treeview column title. If a
custom widget has been set (see the <a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-widget" title="gtk.TreeViewColumn.set_widget"><tt class="methodname">set_widget</tt>()</a>
method), this value is ignored.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--get-title"></a><h3>gtk.TreeViewColumn.get_title</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_title</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 title of the column.</td></tr></tbody></table><p>The <tt class="methodname">get_title</tt>() method returns the
value of the "title" property that contains the treeview column
title.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--set-expand"></a><h3>gtk.TreeViewColumn.set_expand</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_expand</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>expand</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>expand</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt> the column expands
to take extra space if available.</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_expand</tt>() method sets the
"expand" property to the value of <i class="parameter"><tt>expand</tt></i>. If expand
is <tt class="literal">TRUE</tt> the column expands to take available extra
space. This space is shared equally among all columns that have their
"expand" property set to <tt class="literal">TRUE</tt>. If no column has this
option set, then the last column gets all extra space. By default, every
column is created with this <tt class="literal">FALSE</tt>.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--get-expand"></a><h3>gtk.TreeViewColumn.get_expand</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_expand</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 column
expands</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_expand</tt>() method returns the
value of the "expand" property. If "expand is <tt class="literal">TRUE</tt> if the
column expands to take any available space.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--set-clickable"></a><h3>gtk.TreeViewColumn.set_clickable</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_clickable</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>active</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>active</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt> the treeview column
header can be clicked</td></tr></tbody></table><p>The <tt class="methodname">set_clickable</tt>() method sets the
"clickable" property to the value of <i class="parameter"><tt>active</tt></i>. If
<i class="parameter"><tt>active</tt></i> is <tt class="literal">TRUE</tt> the header can take
keyboard focus, and be clicked.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--get-clickable"></a><h3>gtk.TreeViewColumn.get_clickable</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_clickable</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 user can click
the column header.</td></tr></tbody></table><p>The <tt class="methodname">get_clickable</tt>() method returns the
value of the "clickable" property. If "clickable" is <tt class="literal">TRUE</tt>
the user can click on the header for the treeview column.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--set-widget"></a><h3>gtk.TreeViewColumn.set_widget</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_widget</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>a child <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a>.</td></tr></tbody></table><p>The <tt class="methodname">set_widget</tt>() method sets the widget
in the header to be <i class="parameter"><tt>widget</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--get-widget"></a><h3>gtk.TreeViewColumn.get_widget</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_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 <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a> in the
column header, or <tt class="literal">None</tt></td></tr></tbody></table><p>The <tt class="methodname">get_widget</tt>() method returns the
<a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a> in
the button on the column header. If a custom widget has not been set using
the <a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-widget" title="gtk.TreeViewColumn.set_widget"><tt class="methodname">set_widget</tt>()</a>
method <tt class="literal">None</tt> is returned.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--set-alignment"></a><h3>gtk.TreeViewColumn.set_alignment</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_alignment</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>xalign</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>xalign</tt></b>:</span></td><td>the horizontal alignment, in the range 0.0 to
1.0 inclusive.</td></tr></tbody></table><p>The <tt class="methodname">set_alignment</tt>() method sets the
"alignment" property to the value of <i class="parameter"><tt>xalign</tt></i>.
<i class="parameter"><tt>xalign</tt></i> specifies the alignment of the title or custom
widget inside the column header. The alignment value specifies the fraction
of free space to the left of the widget.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--get-alignment"></a><h3>gtk.TreeViewColumn.get_alignment</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_alignment</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 current alignment of the treeview
column.</td></tr></tbody></table><p>The <tt class="methodname">get_alignment</tt>() method returns the
value of the "alignment" property that contains the current horizontal
alignment of the treeview column. See the <a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-alignment" title="gtk.TreeViewColumn.set_alignment"><tt class="methodname">set_alignment</tt>()</a>
method for more detail.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--set-reorderable"></a><h3>gtk.TreeViewColumn.set_reorderable</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_reorderable</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>reorderable</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>reorderable</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt>, the column can be
reordered.</td></tr></tbody></table><p>The <tt class="methodname">set_reorderable</tt>() method sets the
"reorderable" property to the value of <i class="parameter"><tt>reorderable</tt></i>.
If <i class="parameter"><tt>reorderable</tt></i> is <tt class="literal">TRUE</tt>, the column
can be reordered by the end user dragging the header.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--get-reorderable"></a><h3>gtk.TreeViewColumn.get_reorderable</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_reorderable</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 treeview column
can be reordered by the user.</td></tr></tbody></table><p>The <tt class="methodname">get_reorderable</tt>() method returns
the value of the "reorderable" property. If "reorderable" is
<tt class="literal">TRUE</tt> the treeview column can be reordered by the
user.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--set-sort-column-id"></a><h3>gtk.TreeViewColumn.set_sort_column_id</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_sort_column_id</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>sort_column_id</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>sort_column_id</tt></b>:</span></td><td>the logical column ID of the model to sort
on or -1.</td></tr></tbody></table><p>The <tt class="methodname">set_sort_column_id</tt>() method is a
convenience method that sets the column's sort column ID to the value
specified by <i class="parameter"><tt>sort_column_id</tt></i> (an integer value). The
treeview model sorts on the <i class="parameter"><tt>sort_column_id</tt></i> when this
treeview column is selected for sorting. This method also makes the treeview
column header clickable. If <i class="parameter"><tt>sort_column_id</tt></i> is -1
sorting using the treeview column is disabled.</p><p>This method sets up a number of callbacks that manage the
sorting of the tree model when the column header is clicked. These callbacks
provide toggling of the sort order, enabling the sort indicator and so
on.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--get-sort-column-id"></a><h3>gtk.TreeViewColumn.get_sort_column_id</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_sort_column_id</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 current column ID for this column, or -1 if
this column can't be used for sorting.</td></tr></tbody></table><p>The <tt class="methodname">get_sort_column_id</tt>() method returns
the logical column ID that the model sorts on when this column is selected
for sorting. See the <a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-sort-column-id" title="gtk.TreeViewColumn.set_sort_column_id"><tt class="methodname">set_sort_column_id</tt>()</a>
method.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--set-sort-indicator"></a><h3>gtk.TreeViewColumn.set_sort_indicator</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_sort_indicator</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>setting</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>setting</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt> display an indicator
that the column is sorted</td></tr></tbody></table><p>The <tt class="methodname">set_sort_indicator</tt>() method sets
the "sort-indicator" property to the value of
<i class="parameter"><tt>setting</tt></i>. If <i class="parameter"><tt>setting</tt></i> is
<tt class="literal">TRUE</tt> an arrow is displayed in the header button when the
column is sorted. Call the <a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-sort-order" title="gtk.TreeViewColumn.set_sort_order"><tt class="methodname">set_sort_order</tt>()</a>
to change the direction of the arrow.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>If the <a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-sort-column-id" title="gtk.TreeViewColumn.set_sort_column_id"><tt class="methodname">set_sort_column_id</tt>()</a>
convenience method has been called the visibility of the sort indicator will
be managed automatically. See the <a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-sort-order" title="gtk.TreeViewColumn.set_sort_order"><tt class="methodname">set_sort_order</tt>()</a>
method for more information.</p></div></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--get-sort-indicator"></a><h3>gtk.TreeViewColumn.get_sort_indicator</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_sort_indicator</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 sort indicator
arrow is displayed</td></tr></tbody></table><p>The <tt class="methodname">get_sort_indicator</tt>() method returns
the value of the "sort-indicator" property. If "sort-indicator" is
<tt class="literal">TRUE</tt> an arrow is displayed in the header button when the
column is sorted.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--set-sort-order"></a><h3>gtk.TreeViewColumn.set_sort_order</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_sort_order</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>order</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>order</tt></b>:</span></td><td>the sort order that the sort indicator should
indicate</td></tr></tbody></table><p>The <tt class="methodname">set_sort_order</tt>() method set the "sort-order" property to the
value of order. The value of order must be either:
<tt class="literal">gtk.SORT_ASCENDING</tt> or
<tt class="literal">gtk.SORT_DESCENDING</tt>. This method changes the appearance
of the sort indicator.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method <span class="emphasis"><em>does not</em></span> actually sort the
model. Use the <a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-sort-column-id" title="gtk.TreeViewColumn.set_sort_column_id"><tt class="methodname">set_sort_column_id</tt>()</a>
method if you want automatic sorting support. This method is primarily for
custom sorting behavior, and should be used in conjunction with the <a href="class-gtktreesortable.html#method-gtktreesortable--set-sort-column-id" title="gtk.TreeSortable.set_sort_column_id"><tt class="methodname">set_sort_column_id</tt>()</a>
method to do that. For custom models, the mechanism will vary.</p></div><p>The sort indicator changes direction to indicate normal sort or
reverse sort. Of course, you must have the sort indicator enabled to see
anything when calling this method; see the <a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-sort-indicator" title="gtk.TreeViewColumn.set_sort_indicator"><tt class="methodname">set_sort_indicator</tt>()</a>
method.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--get-sort-order"></a><h3>gtk.TreeViewColumn.get_sort_order</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_sort_order</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 sort order the sort indicator is
indicating</td></tr></tbody></table><p>The <tt class="methodname">get_sort_order</tt>() method returns the
value of the "sort-order" property that indicates in which direction the
treeview column is sorted. See the <a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-sort-order" title="gtk.TreeViewColumn.set_sort_order"><tt class="methodname">set_sort_order</tt>()</a>
method for more detail.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--cell-set-cell-data"></a><h3>gtk.TreeViewColumn.cell_set_cell_data</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">cell_set_cell_data</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>tree_model</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>is_expander</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>is_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>tree_model</tt></b>:</span></td><td>the <a href="class-gtktreemodel.html" title="gtk.TreeModel"><tt class="classname">gtk.TreeModel</tt></a> to
get the cell renderer's attributes from.</td></tr><tr><td><span class="term"><b class="parameter"><tt>iter</tt></b>:</span></td><td>the <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a> to
get the cell renderer's attributes from.</td></tr><tr><td><span class="term"><b class="parameter"><tt>is_expander</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt>, the row has
children</td></tr><tr><td><span class="term"><b class="parameter"><tt>is_expanded</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt>, the row has visible
children</td></tr></tbody></table><p>The <tt class="methodname">cell_set_cell_data</tt>() method sets
the cell renderer attributes based on the specified
<i class="parameter"><tt>tree_model</tt></i> and <i class="parameter"><tt>iter</tt></i>. That is,
for every attribute mapping in the treeview column, it will get a value from
the set column in the <i class="parameter"><tt>iter</tt></i>, and use that value to set
the attribute on the cell renderer. If <i class="parameter"><tt>is_expander</tt></i> is
<tt class="literal">TRUE</tt> the tree model row has children that may or may not
be displayed. If <i class="parameter"><tt>is_expanded</tt></i> is
<tt class="literal">TRUE</tt> the tree model row has children that are
displayed.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--cell-get-size"></a><h3>gtk.TreeViewColumn.cell_get_size</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">cell_get_size</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>a tuple containing five values: a <a href="class-gdkrectangle.html" title="gtk.gdk.Rectangle"><tt class="classname">gtk.gdk.Rectangle</tt></a>
holding the area a the column will be allocated; the x offset of the cell;
the y offset of the cell; the cell width; and, the cell
height</td></tr></tbody></table><p>The <tt class="methodname">cell_get_size</tt>() method returns a
tuple containing:</p><div class="itemizedlist"><ul type="disc"><li>a <a href="class-gdkrectangle.html" title="gtk.gdk.Rectangle"><tt class="classname">gtk.gdk.Rectangle</tt></a>
holding the area a cell in the treeview column will be allocated.</li><li>the x offset of the cell relative to
<i class="parameter"><tt>cell_area</tt></i>.</li><li>the y offset of the cell relative to
<i class="parameter"><tt>cell_area</tt></i>.</li><li>the width of the cell.</li><li>the height of the cell.</li></ul></div><p>This method is used primarily by the <a href="class-gtktreeview.html" title="gtk.TreeView"><tt class="classname">gtk.TreeView</tt></a>.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--cell-is-visible"></a><h3>gtk.TreeViewColumn.cell_is_visible</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">cell_is_visible</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 any of the cells
packed into the treeview column are currently visible</td></tr></tbody></table><p>The <tt class="methodname">cell_is_visible</tt>() method returns
<tt class="literal">TRUE</tt> if any of the cells packed into the treeview column
are visible. For this to be meaningful, you must first initialize the cells
with the <a href="class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--cell-set-cell-data" title="gtk.TreeViewColumn.cell_set_cell_data"><tt class="methodname">cell_set_cell_data</tt>()</a>
method.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--focus-cell"></a><h3>gtk.TreeViewColumn.focus_cell</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">focus_cell</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>cell</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>cell</tt></b>:</span></td><td>a <a href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><tt class="classname">gtk.CellRenderer</tt></a></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.2 and above.</p></div><p>The <tt class="methodname">focus_cell</tt>() method sets the
current keyboard focus to be at <i class="parameter"><tt>cell</tt></i>, if the column
contains 2 or more editable and activatable cells.</p></div><div class="refsect2" lang="en"><a name="method-gtktreeviewcolumn--cell-get-position"></a><h3>gtk.TreeViewColumn.cell_get_position</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">cell_get_position</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>cell_renderer</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>cell_renderer</tt></b>:</span></td><td>a <a href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><tt class="classname">gtk.CellRenderer</tt></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a 2-tuple containing the horizontal position
and size of a cell 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">cell_get_position</tt>() method returns
the horizontal position and size of the cell specified by
<i class="parameter"><tt>cell_renderer</tt></i>. If the cell is not found in the
column, <tt class="literal">None</tt> is returned.</p></div></div><div class="refsect1" lang="en"><a name="id3613717"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="signal-gtktreeviewcolumn--clicked"></a><h3>The "clicked" gtk.TreeViewColumn 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>treeviewcolumn</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>treeviewcolumn</tt></i>:</span></td><td>the treeviewcolumn 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><p>The "clicked" signal is emitted when the user clicks on the
<i class="parameter"><tt>treeviewcolumn</tt></i> header button.</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-gtktreeview.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-gtkuimanager.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.TreeView</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">gtk.UIManager</td></tr></table></div></body></html>
|