1
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.ComboBoxEntry</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gtk-class-reference.html" title="The gtk Class Reference"><link rel="prev" href="class-gtkcombobox.html" title="gtk.ComboBox"><link rel="next" href="class-gtkcontainer.html" title="gtk.Container"></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.ComboBoxEntry</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkcombobox.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkcontainer.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtkcomboboxentry"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.ComboBoxEntry</h2><p>gtk.ComboBoxEntry — a text entry field with
2
a dropdown list (new in PyGTK 2.4)</p></div><div class="refsect1" lang="en"><a name="id3437529"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.ComboBoxEntry</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkcombobox.html" title="gtk.ComboBox">gtk.ComboBox</a></span></span>, <span class="ooclass"><span class="classname"><a class="link" href="class-gtkcelllayout.html" title="gtk.CellLayout">gtk.CellLayout</a></span></span>):
2
a dropdown list (new in PyGTK 2.4)</p></div><div class="refsect1" lang="en"><a name="id3638364"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.ComboBoxEntry</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkcombobox.html" title="gtk.ComboBox">gtk.ComboBox</a></span></span>, <span class="ooclass"><span class="classname"><a class="link" href="class-gtkcelllayout.html" title="gtk.CellLayout">gtk.CellLayout</a></span></span>):
3
3
<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gtkcomboboxentry.html#constructor-gtkcomboboxentry" title="Constructor">gtk.ComboBoxEntry</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>model</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>column</code></strong></span><span class="initializer">=-1</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcomboboxentry.html#method-gtkcomboboxentry--set-text-column" title="gtk.ComboBoxEntry.set_text_column">set_text_column</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>text_column</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcomboboxentry.html#method-gtkcomboboxentry--get-text-column" title="gtk.ComboBoxEntry.get_text_column">get_text_column</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><pre class="programlisting">
4
4
<span class="bold"><strong>Functions</strong></span>
6
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcomboboxentry.html#function-gtk--combo-box-entry-new-text" title="gtk.combo_box_entry_new_text">gtk.combo_box_entry_new_text</a></span>(<span class="methodparam"></span>)</code></pre></div><div class="refsect1" lang="en"><a name="id3437670"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
6
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcomboboxentry.html#function-gtk--combo-box-entry-new-text" title="gtk.combo_box_entry_new_text">gtk.combo_box_entry_new_text</a></span>(<span class="methodparam"></span>)</code></pre></div><div class="refsect1" lang="en"><a name="id3638505"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
7
7
+-- <a class="link" href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
8
8
+-- <a class="link" href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a>
9
9
+-- <a class="link" href="class-gtkcontainer.html" title="gtk.Container">gtk.Container</a>
10
10
+-- <a class="link" href="class-gtkbin.html" title="gtk.Bin">gtk.Bin</a>
11
11
+-- <a class="link" href="class-gtkcombobox.html" title="gtk.ComboBox">gtk.ComboBox</a>
12
12
+-- <a class="link" href="class-gtkcomboboxentry.html" title="gtk.ComboBoxEntry">gtk.ComboBoxEntry</a>
13
</pre></div><div class="refsect1" lang="en"><a name="id3437718"></a><h2>Implemented Interfaces</h2><p>
13
</pre></div><div class="refsect1" lang="en"><a name="id3638553"></a><h2>Implemented Interfaces</h2><p>
14
14
<a class="link" href="class-gtkcomboboxentry.html" title="gtk.ComboBoxEntry"><code class="classname">gtk.ComboBoxEntry</code></a>
16
16
<a class="link" href="class-gtkbuildable.html" title="gtk.Buildable"><code class="classname">gtk.Buildable</code></a>
17
17
<a class="link" href="class-gtkcelllayout.html" title="gtk.CellLayout"><code class="classname">gtk.CellLayout</code></a>
18
18
</p></div><div class="refsect1" lang="en"><a name="properties-gtkcomboboxentry"></a><h2>gtk.ComboBoxEntry Properties</h2><p><a class="link" href="class-gtkobject.html#properties-gtkobject" title="gtk.Object Properties">gtk.Object Properties</a></p><p><a class="link" href="class-gtkwidget.html#properties-gtkwidget" title="gtk.Widget Properties">gtk.Widget Properties</a></p><p><a class="link" href="class-gtkcontainer.html#properties-gtkcontainer" title="gtk.Container Properties">gtk.Container Properties</a></p><p><a class="link" href="class-gtkcombobox.html#properties-gtkcombobox" title="gtk.ComboBox Properties">gtk.ComboBox Properties</a></p><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col><col><col></colgroup><tbody><tr valign="top"><td valign="top">"text-column"</td><td valign="top">Read-Write</td><td valign="top">The column in the <a class="link" href="class-gtktreemodel.html" title="gtk.TreeModel"><code class="classname">gtk.TreeModel</code></a>
19
to get the strings from.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="style-properties-gtkcomboboxentry"></a><h2>gtk.ComboBoxEntry Style Properties</h2><p><a class="link" href="class-gtkwidget.html#style-properties-gtkwidget" title="gtk.Widget Style Properties">gtk.Widget Style Properties</a></p><p><a class="link" href="class-gtkcombobox.html#style-properties-gtkcombobox" title="gtk.ComboBox Style Properties">gtk.ComboBox Style Properties</a></p></div><div class="refsect1" lang="en"><a name="signal-prototypes-gtkcomboboxentry"></a><h2>gtk.ComboBoxEntry Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p><p><a class="link" href="class-gtkobject.html#signal-prototypes-gtkobject" title="gtk.Object Signal Prototypes">gtk.Object Signal Prototypes</a></p><p><a class="link" href="class-gtkwidget.html#signal-prototypes-gtkwidget" title="gtk.Widget Signal Prototypes">gtk.Widget Signal Prototypes</a></p><p><a class="link" href="class-gtkcontainer.html#signal-prototypes-gtkcontainer" title="gtk.Container Signal Prototypes">gtk.Container Signal Prototypes</a></p><p><a class="link" href="class-gtkcombobox.html#signal-prototypes-gtkcombobox" title="gtk.ComboBox Signal Prototypes">gtk.ComboBox Signal Prototypes</a></p><p><a class="link" href="class-gtkcelleditable.html#signal-prototypes-gtkcelleditable" title="gtk.CellEditable Signal Prototypes">gtk.CellEditable Signal Prototypes</a></p></div><div class="refsect1" lang="en"><a name="id3437908"></a><h2>Description</h2><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This widget is available in GTK+ 2.4 and PyGTK 2.4 and
19
to get the strings from.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="style-properties-gtkcomboboxentry"></a><h2>gtk.ComboBoxEntry Style Properties</h2><p><a class="link" href="class-gtkwidget.html#style-properties-gtkwidget" title="gtk.Widget Style Properties">gtk.Widget Style Properties</a></p><p><a class="link" href="class-gtkcombobox.html#style-properties-gtkcombobox" title="gtk.ComboBox Style Properties">gtk.ComboBox Style Properties</a></p></div><div class="refsect1" lang="en"><a name="signal-prototypes-gtkcomboboxentry"></a><h2>gtk.ComboBoxEntry Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p><p><a class="link" href="class-gtkobject.html#signal-prototypes-gtkobject" title="gtk.Object Signal Prototypes">gtk.Object Signal Prototypes</a></p><p><a class="link" href="class-gtkwidget.html#signal-prototypes-gtkwidget" title="gtk.Widget Signal Prototypes">gtk.Widget Signal Prototypes</a></p><p><a class="link" href="class-gtkcontainer.html#signal-prototypes-gtkcontainer" title="gtk.Container Signal Prototypes">gtk.Container Signal Prototypes</a></p><p><a class="link" href="class-gtkcombobox.html#signal-prototypes-gtkcombobox" title="gtk.ComboBox Signal Prototypes">gtk.ComboBox Signal Prototypes</a></p><p><a class="link" href="class-gtkcelleditable.html#signal-prototypes-gtkcelleditable" title="gtk.CellEditable Signal Prototypes">gtk.CellEditable Signal Prototypes</a></p></div><div class="refsect1" lang="en"><a name="id3638742"></a><h2>Description</h2><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This widget is available in GTK+ 2.4 and PyGTK 2.4 and
20
20
above.</p></div><p>The <a class="link" href="class-gtkcomboboxentry.html" title="gtk.ComboBoxEntry"><code class="classname">gtk.ComboBoxEntry</code></a>
21
21
is a replacement for the <a class="link" href="class-gtkcombo.html" title="gtk.Combo"><code class="classname">gtk.Combo</code></a>. The <a class="link" href="class-gtkcomboboxentry.html" title="gtk.ComboBoxEntry"><code class="classname">gtk.ComboBoxEntry</code></a>
22
22
is subclassed from <a class="link" href="class-gtkcombobox.html" title="gtk.ComboBox"><code class="classname">gtk.ComboBox</code></a> and
66
66
<a class="link" href="class-gtkcomboboxentry.html#method-gtkcomboboxentry--set-text-column" title="gtk.ComboBoxEntry.set_text_column"><code class="methodname">set_text_column</code>()</a>
67
67
method it cannot be changed. A ValueError exception is thrown if
68
68
<em class="parameter"><code>column</code></em> is outside the range of column numbers for
69
<em class="parameter"><code>model</code></em>.</p></div><div class="refsect1" lang="en"><a name="id3438348"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtkcomboboxentry--set-text-column"></a><h3>gtk.ComboBoxEntry.set_text_column</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_text_column</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>text_column</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>text_column</code></strong> :</span></p></td><td>A column in the associated <a class="link" href="class-gtktreemodel.html" title="gtk.TreeModel"><code class="classname">gtk.TreeModel</code></a>
69
<em class="parameter"><code>model</code></em>.</p></div><div class="refsect1" lang="en"><a name="id3639182"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtkcomboboxentry--set-text-column"></a><h3>gtk.ComboBoxEntry.set_text_column</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_text_column</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>text_column</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>text_column</code></strong> :</span></p></td><td>A column in the associated <a class="link" href="class-gtktreemodel.html" title="gtk.TreeModel"><code class="classname">gtk.TreeModel</code></a>
70
70
to use as the data source for the strings.</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 <code class="methodname">set_text_column</code>() method sets the
71
71
"text-column" property to the value of <em class="parameter"><code>tree_column</code></em>
72
72
only if the text column has not been set (that is, "text-column" is -1). The
78
78
entry.</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 <code class="methodname">get_text_column</code>() method returns
79
79
the number of the <a class="link" href="class-gtktreemodel.html" title="gtk.TreeModel"><code class="classname">gtk.TreeModel</code></a>
80
80
column that is used as the data source for the strings of the combo box
81
entry.</p></div></div><div class="refsect1" lang="en"><a name="id3438514"></a><h2>Functions</h2><div class="refsect2" lang="en"><a name="function-gtk--combo-box-entry-new-text"></a><h3>gtk.combo_box_entry_new_text</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.combo_box_entry_new_text</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A new <a class="link" href="class-gtkcomboboxentry.html" title="gtk.ComboBoxEntry"><code class="classname">gtk.ComboBoxEntry</code></a>
81
entry.</p></div></div><div class="refsect1" lang="en"><a name="id3639349"></a><h2>Functions</h2><div class="refsect2" lang="en"><a name="function-gtk--combo-box-entry-new-text"></a><h3>gtk.combo_box_entry_new_text</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.combo_box_entry_new_text</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A new <a class="link" href="class-gtkcomboboxentry.html" title="gtk.ComboBoxEntry"><code class="classname">gtk.ComboBoxEntry</code></a>
82
82
widget.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.4 and above.</p></div><p>The <code class="function">gtk.combo_box_entry_new_text</code>() function
83
83
is a convenience function which constructs a new <a class="link" href="class-gtkcomboboxentry.html" title="gtk.ComboBoxEntry"><code class="classname">gtk.ComboBoxEntry</code></a>,
84
84
just displaying strings. If you use this function to create a combo box