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
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gtk.Entry</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-gtkeditable.html" title="gtk.Editable"><link rel="next" href="class-gtkentrycompletion.html" title="gtk.EntryCompletion"></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.Entry</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkeditable.html">Prev</a></td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"><a accesskey="n" href="class-gtkentrycompletion.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtkentry"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>gtk.Entry</h2><p>gtk.Entry — a single line text entry field.</p></div><div class="refsect1" lang="en"><a name="id3404824"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.Entry</span></span>(<span class="ooclass"><span class="classname"><a href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a></span></span>, <span class="ooclass"><span class="classname"><a href="class-gtkeditable.html" title="gtk.Editable">gtk.Editable</a></span></span>, <span class="ooclass"><span class="classname"><a href="class-gtkcelleditable.html" title="gtk.CellEditable">gtk.CellEditable</a></span></span>):
<code class="constructorsynopsis"> <span class="methodname"><a href="class-gtkentry.html#constructor-gtkentry" title="Constructor">gtk.Entry</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>max</tt></b></span><span class="initializer">=0</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkentry.html#method-gtkentry--set-visibility" title="gtk.Entry.set_visibility">set_visibility</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-gtkentry.html#method-gtkentry--get-visibility" title="gtk.Entry.get_visibility">get_visibility</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkentry.html#method-gtkentry--set-invisible-char" title="gtk.Entry.set_invisible_char">set_invisible_char</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>ch</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkentry.html#method-gtkentry--get-invisible-char" title="gtk.Entry.get_invisible_char">get_invisible_char</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkentry.html#method-gtkentry--set-has-frame" title="gtk.Entry.set_has_frame">set_has_frame</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-gtkentry.html#method-gtkentry--get-has-frame" title="gtk.Entry.get_has_frame">get_has_frame</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkentry.html#method-gtkentry--set-max-length" title="gtk.Entry.set_max_length">set_max_length</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>max</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkentry.html#method-gtkentry--get-max-length" title="gtk.Entry.get_max_length">get_max_length</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkentry.html#method-gtkentry--set-activates-default" title="gtk.Entry.set_activates_default">set_activates_default</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-gtkentry.html#method-gtkentry--get-activates-default" title="gtk.Entry.get_activates_default">get_activates_default</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkentry.html#method-gtkentry--set-width-chars" title="gtk.Entry.set_width_chars">set_width_chars</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>n_chars</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkentry.html#method-gtkentry--get-width-chars" title="gtk.Entry.get_width_chars">get_width_chars</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkentry.html#method-gtkentry--set-text" title="gtk.Entry.set_text">set_text</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkentry.html#method-gtkentry--get-text" title="gtk.Entry.get_text">get_text</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkentry.html#method-gtkentry--get-layout" title="gtk.Entry.get_layout">get_layout</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkentry.html#method-gtkentry--get-layout-offsets" title="gtk.Entry.get_layout_offsets">get_layout_offsets</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkentry.html#method-gtkentry--set-alignment" title="gtk.Entry.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-gtkentry.html#method-gtkentry--get-alignment" title="gtk.Entry.get_alignment">get_alignment</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkentry.html#method-gtkentry--set-completion" title="gtk.Entry.set_completion">set_completion</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>width_chars</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkentry.html#method-gtkentry--get-completion" title="gtk.Entry.get_completion">get_completion</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3405191"></a><h2>Ancestry</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="synopsis">+-- <a href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+-- <a href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
+-- <a href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a>
+-- <a href="class-gtkentry.html" title="gtk.Entry">gtk.Entry</a> (implements <a href="class-gtkeditable.html" title="gtk.Editable">gtk.Editable</a>, <a href="class-gtkcelleditable.html" title="gtk.CellEditable">gtk.CellEditable</a>)
</pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3405232"></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">"cursor-position"</td><td valign="top">Read</td><td valign="top">The current position of the insertion cursor as a
character index.</td></tr><tr valign="top"><td valign="top">"selection-bound"</td><td valign="top">Read</td><td valign="top">The position of the opposite end of the selection from
the cursor as a character index.</td></tr><tr valign="top"><td valign="top">"editable"</td><td valign="top">Read/Write</td><td valign="top">If <tt class="literal">TRUE</tt> the entry contents can be
edited</td></tr><tr valign="top"><td valign="top">"max-length"</td><td valign="top">Read/Write</td><td valign="top">The maximum number of characters for this entry. Zero if no
maximum.</td></tr><tr valign="top"><td valign="top">"visibility"</td><td valign="top">Read/Write</td><td valign="top">If <tt class="literal">FALSE</tt> displays the "invisible char"
instead of the actual text (e.g. password mode)</td></tr><tr valign="top"><td valign="top">"has-frame"</td><td valign="top">Read/Write</td><td valign="top">If <tt class="literal">FALSE</tt> removes outside bevel from
entry.</td></tr><tr valign="top"><td valign="top">"invisible-char"</td><td valign="top">Read/Write</td><td valign="top">The character to use when masking entry contents (when
"visibility" is <tt class="literal">FALSE</tt>)</td></tr><tr valign="top"><td valign="top">"activates-default"</td><td valign="top">Read/Write</td><td valign="top">If <tt class="literal">TRUE</tt> activate the default widget
(such as the default button in a dialog) when Enter is pressed.</td></tr><tr valign="top"><td valign="top">"width-chars"</td><td valign="top">Read/Write</td><td valign="top">The number of characters to leave space for in the
entry.</td></tr><tr valign="top"><td valign="top">"scroll-offset"</td><td valign="top">Read</td><td valign="top">The number of pixels of the entry scrolled off the screen
to the left.</td></tr><tr valign="top"><td valign="top">"text"</td><td valign="top">Read/Write</td><td valign="top">The contents of the entry.</td></tr><tr valign="top"><td valign="top">"xalign"</td><td valign="top">Read/Write</td><td valign="top">The horizontal alignment ranging from 0.0 to 1.0 representing
the fraction of freespace to the left (right for RTL layouts) of the
text. Available in GTK+ 2.4 and above.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="id3405485"></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-gtkentry.html#signal-gtkentry--activate" title='The "activate" gtk.Entry Signal'>activate</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>entry</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><tr><td><span class="term">"<a href="class-gtkentry.html#signal-gtkentry--copy-clipboard" title='The "copy-clipboard" gtk.Entry Signal'>copy-clipboard</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>entry</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><tr><td><span class="term">"<a href="class-gtkentry.html#signal-gtkentry--cut-clipboard" title='The "cut-clipboard" gtk.Entry Signal'>cut-clipboard</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>entry</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><tr><td><span class="term">"<a href="class-gtkentry.html#signal-gtkentry--delete-from-cursor" title='The "delete-from-cursor" gtk.Entry Signal'>delete-from-cursor</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>entry</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>delete_type</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>count</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><tr><td><span class="term">"<a href="class-gtkentry.html#signal-gtkentry--insert-at-cursor" title='The "insert-at-cursor" gtk.Entry Signal'>insert-at-cursor</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>entry</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>string</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><tr><td><span class="term">"<a href="class-gtkentry.html#signal-gtkentry--move-cursor" title='The "move-cursor" gtk.Entry Signal'>move-cursor</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>entry</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>step_size</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>count</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>extend_selection</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><tr><td><span class="term">"<a href="class-gtkentry.html#signal-gtkentry--paste-clipboard" title='The "paste-clipboard" gtk.Entry Signal'>paste-clipboard</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>entry</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><tr><td><span class="term">"<a href="class-gtkentry.html#signal-gtkentry--populate-popup" title='The "populate-popup" gtk.Entry Signal'>populate-popup</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>entry</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>menu</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><tr><td><span class="term">"<a href="class-gtkentry.html#signal-gtkentry--toggle-overwrite" title='The "toggle-overwrite" gtk.Entry Signal'>toggle-overwrite</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>entry</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="id3405876"></a><h2>Description</h2><p>The <a href="class-gtkentry.html" title="gtk.Entry"><tt class="classname">gtk.Entry</tt></a> widget is a
single line text entry widget. A fairly large set of key bindings are
supported by default. If the entered text is longer than the allocation of
the widget, the widget will scroll so that the cursor position is
visible.</p></div><div class="refsect1" lang="en"><a name="constructor-gtkentry"></a><h2>Constructor</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.Entry</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>max</tt></b></span><span class="initializer">=0</span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>max</tt></b>:</span></td><td>the maximum length of the entry, or 0 for no
maximum. (other than the maximum length of entries.) The value passed in
will be limited to the range 0-65536.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-gtkentry.html" title="gtk.Entry"><tt class="classname">gtk.Entry</tt></a>.</td></tr></tbody></table><p>Creates a new <a href="class-gtkentry.html" title="gtk.Entry"><tt class="classname">gtk.Entry</tt></a> widget with
the maximum length specified by <i class="parameter"><tt>max</tt></i>.</p></div><div class="refsect1" lang="en"><a name="id3405975"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtkentry--set-visibility"></a><h3>gtk.Entry.set_visibility</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_visibility</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 FALSE the contents are obscured using the
"invisible-char"</td></tr></tbody></table><p>The <tt class="methodname">set_visibility</tt>() method sets the
"visibility" property to the value of <i class="parameter"><tt>visible</tt></i>. If
visible is <tt class="literal">TRUE</tt> the contents of the entry are displayed
as plain text. If visible is <tt class="literal">FALSE</tt>, the contents are
obscured by replacing the characters with the invisible character (specified
by the "invisible-char" property). The characters will also be obscured when
the text in the entry widget is copied elsewhere. The default invisible char
is the asterisk '*', but it can be changed with <a href="class-gtkentry.html#method-gtkentry--set-invisible-char" title="gtk.Entry.set_invisible_char"><tt class="methodname">set_invisible_char</tt>()</a>.</p></div><div class="refsect2" lang="en"><a name="method-gtkentry--get-visibility"></a><h3>gtk.Entry.get_visibility</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_visibility</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 text is
currently visible</td></tr></tbody></table><p>The <tt class="methodname">get_visibility</tt>() method retrieves
the value of the "visibility" property that determines whether the text in
<i class="parameter"><tt>entry</tt></i> is visible. See <a href="class-gtkentry.html#method-gtkentry--set-visibility" title="gtk.Entry.set_visibility"><tt class="methodname">set_visibility</tt>()</a>.</p></div><div class="refsect2" lang="en"><a name="method-gtkentry--set-invisible-char"></a><h3>gtk.Entry.set_invisible_char</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_invisible_char</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>ch</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>ch</tt></b>:</span></td><td>a Unicode character</td></tr></tbody></table><p>The <tt class="methodname">set_invisible_char</tt>() method sets
the "invisible-char" property with the value of <i class="parameter"><tt>ch</tt></i>.
The "invisible-char" is the character to use in place of the actual text
when <a href="class-gtkentry.html#method-gtkentry--set-visibility" title="gtk.Entry.set_visibility"><tt class="methodname">set_visibility</tt>()</a>
has been called to set text visibility to <tt class="literal">FALSE</tt>. i.e.
this is the character used in "password mode" to show the user how many
characters have been typed. The default invisible character is an asterisk
('*'). If you set the invisible character to 0, then the user will get no
feedback at all; there will be no text on the screen as they type.</p></div><div class="refsect2" lang="en"><a name="method-gtkentry--get-invisible-char"></a><h3>gtk.Entry.get_invisible_char</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_invisible_char</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 invisible char, or 0, if the entry
does not show invisible text at all.</td></tr></tbody></table><p>The get_invisible_char() method retrieves the value of the
"invisible-char" property. The "invisible-char" is the character displayed
in place of the real characters for entries with visibility set to
<tt class="literal">FALSE</tt>. See <a href="class-gtkentry.html#method-gtkentry--set-invisible-char" title="gtk.Entry.set_invisible_char"><tt class="methodname">set_invisible_char</tt>()</a>.</p></div><div class="refsect2" lang="en"><a name="method-gtkentry--set-has-frame"></a><h3>gtk.Entry.set_has_frame</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_has_frame</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 TRUE the entry is displayed with a beveled
frame around it.</td></tr></tbody></table><p>The <tt class="methodname">set_has_frame</tt>() method sets the
"has-frame" 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> the entry is
displayed with a beveled frame around it.</p></div><div class="refsect2" lang="en"><a name="method-gtkentry--get-has-frame"></a><h3>gtk.Entry.get_has_frame</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_has_frame</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>whether the entry has a beveled
frame</td></tr></tbody></table><p>The get_has_frame() method gets the value of the "has-frame"
property. If "has-frame" is TRUE the entry will be displayed with a beveled
frame around it.</p></div><div class="refsect2" lang="en"><a name="method-gtkentry--set-max-length"></a><h3>gtk.Entry.set_max_length</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_max_length</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>max</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</tt></b>:</span></td><td>the maximum length of the entry, or 0 for no
maximum. (other than the maximum length of entries.) The value passed in
will be clamped to the range 0-65536.</td></tr></tbody></table><p>The <tt class="methodname">set_max_length</tt>() method sets the
"max-length" property to the value of <i class="parameter"><tt>max</tt></i>. The
"max-length" property sets the maximum allowed length of the contents of the
widget. If the current contents are longer than the given length, then they
will be truncated to fit. If max is 0 then there is no maximum length (other
than 65536).</p></div><div class="refsect2" lang="en"><a name="method-gtkentry--get-max-length"></a><h3>gtk.Entry.get_max_length</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_max_length</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 allowed number of characters in
<a href="class-gtkentry.html" title="gtk.Entry"><tt class="classname">gtk.Entry</tt></a>, or 0
if there is no maximum.</td></tr></tbody></table><p>The get_max_length() method retrieves the value of the
"max-length" property that specifies the maximum allowed length of the text
in the entry. See <a href="class-gtkentry.html#method-gtkentry--set-max-length" title="gtk.Entry.set_max_length"><tt class="methodname">set_max_length</tt>()</a>.</p></div><div class="refsect2" lang="en"><a name="method-gtkentry--set-activates-default"></a><h3>gtk.Entry.set_activates_default</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_activates_default</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> activate the
window's default widget on an <span><b class="keycap">Enter</b></span>
key press</td></tr></tbody></table><p>The <tt class="methodname">set_activates_default</tt>() method sets
the "activates-default" 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>, pressing the <span><b class="keycap">Enter</b></span> key in the
entry will activate the default widget for the window containing the entry.
This usually means that the dialog box containing the entry will be closed,
since the default widget is usually one of the dialog buttons.</p><p>(For experts: if <i class="parameter"><tt>setting</tt></i> is
<tt class="literal">TRUE</tt>, the entry calls <a href="class-gtkwindow.html#method-gtkwindow--activate-default" title="gtk.Window.activate_default"><tt class="methodname">gtk.Window.activate_default</tt>()</a>
on the window containing the entry, in the default handler for the
"activate" signal.)</p></div><div class="refsect2" lang="en"><a name="method-gtkentry--get-activates-default"></a><h3>gtk.Entry.get_activates_default</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_activates_default</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 entry will
activate the default widget</td></tr></tbody></table><p>The <tt class="methodname">get_activates_default</tt>() method
retrieves the value of the "activates-default" property which is set by
<a href="class-gtkentry.html#method-gtkentry--set-activates-default" title="gtk.Entry.set_activates_default"><tt class="methodname">set_activates_default</tt>()</a>.
If "activates-default" is TRUE pressing the <span><b class="keycap">Enter</b></span> key in
the entry will activate the default widget for the window containing the
entry.</p></div><div class="refsect2" lang="en"><a name="method-gtkentry--set-width-chars"></a><h3>gtk.Entry.set_width_chars</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_width_chars</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>n_chars</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>n_chars</tt></b>:</span></td><td>width in chars</td></tr></tbody></table><p>The <tt class="methodname">set_width_chars</tt>() method sets the
"width-chars" property to the value of <i class="parameter"><tt>n_char</tt></i>.
Setting the "width-chars" property changes the size request of the entry to
be about the right size for <i class="parameter"><tt>n_chars</tt></i> characters. Note
that it only changes the size <span class="emphasis"><em>request</em></span>, the size can
still be affected by how you pack the widget into containers. If
<i class="parameter"><tt>n_chars</tt></i> is -1, the size reverts to the default entry
size.</p></div><div class="refsect2" lang="en"><a name="method-gtkentry--get-width-chars"></a><h3>gtk.Entry.get_width_chars</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_width_chars</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>number of chars to request space for, or
negative if unset</td></tr></tbody></table><p>The <tt class="methodname">get_width_chars</tt>() method gets the
value of the "width-chars" property which is set by the <a href="class-gtkentry.html#method-gtkentry--set-width-chars" title="gtk.Entry.set_width_chars"><tt class="methodname">set_width_chars</tt>()</a>
method.</p></div><div class="refsect2" lang="en"><a name="method-gtkentry--set-text"></a><h3>gtk.Entry.set_text</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_text</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</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>text</tt></b>:</span></td><td>a string to use as the new contents of the
entry</td></tr></tbody></table><p>The <tt class="methodname">set_text</tt>() method sets the "text"
property to the value of <i class="parameter"><tt>text</tt></i>. The string in
<i class="parameter"><tt>text</tt></i> replaces the current contents of the
entry.</p></div><div class="refsect2" lang="en"><a name="method-gtkentry--get-text"></a><h3>gtk.Entry.get_text</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_text</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 contents of the entry as a
string</td></tr></tbody></table><p>The <tt class="methodname">get_text</tt>() method returns the value
of the "text" property which is a string containing the contents of the
entry.</p></div><div class="refsect2" lang="en"><a name="method-gtkentry--get-layout"></a><h3>gtk.Entry.get_layout</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_layout</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-pangolayout.html" title="pango.Layout"><tt class="classname">pango.Layout</tt></a> for
this entry</td></tr></tbody></table><p>The get_layout() method gets the <a href="class-pangolayout.html" title="pango.Layout"><tt class="classname">pango.Layout</tt></a> used
to display the entry. The layout is useful to e.g. convert text positions to
pixel positions, in combination with <a href="class-gtkentry.html#method-gtkentry--get-layout-offsets" title="gtk.Entry.get_layout_offsets"><tt class="methodname">get_layout_offsets</tt>()</a>.</p></div><div class="refsect2" lang="en"><a name="method-gtkentry--get-layout-offsets"></a><h3>gtk.Entry.get_layout_offsets</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_layout_offsets</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 the X and Y offsets of the
pango layout</td></tr></tbody></table><p>The <tt class="methodname">get_layout_offsets</tt>() method obtains
the position of the <a href="class-pangolayout.html" title="pango.Layout"><tt class="classname">pango.Layout</tt></a> used
to render text in the entry, in widget coordinates and returns it as a
tuple. This method is used to line up the text in an entry with some other
text, e.g. when using the entry to implement editable cells in a sheet
widget. It is also useful to convert mouse events into coordinates inside
the <a href="class-pangolayout.html" title="pango.Layout"><tt class="classname">pango.Layout</tt></a>, e.g.
to take some action if some part of the entry text is clicked.</p><p>Note that as the user scrolls around in the entry the offsets
will change; you'll need to connect to the "notify::scroll_offset" signal to
track this.</p></div><div class="refsect2" lang="en"><a name="method-gtkentry--set-alignment"></a><h3>gtk.Entry.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 ranging from 0.0 to
1.0 representing the freespace to the left (right for RTL layouts)
of the text.</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_alignment</tt>() method sets the
"xalign" property to the value of <i class="parameter"><tt>xalign</tt></i>. The
alignment controls the horizontal positioning of the contents when the
displayed text is shorter than the width of the entry. The value of
<i class="parameter"><tt>xalign</tt></i> is the fraction of freespace to the left
(right in RTL layouts) of the text.</p></div><div class="refsect2" lang="en"><a name="method-gtkentry--get-alignment"></a><h3>gtk.Entry.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 horizontal alignment ranging from 0.0 to
1.0 representing the freespace to the left (right for RTL layouts)
of the text.</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_alignment</tt>() method returns the
value of the "xalign" property which is the fraction of freespace (if any)
to the left (right in RTL layouts) of the text.</p></div><div class="refsect2" lang="en"><a name="method-gtkentry--set-completion"></a><h3>gtk.Entry.set_completion</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_completion</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>completion</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>completion</tt></b>:</span></td><td>a <a href="class-gtkentrycompletion.html" title="gtk.EntryCompletion"><tt class="classname">gtk.EntryCompletion</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.4 and above.</p></div><p>The <tt class="methodname">set_completion</tt>() method sets the
<a href="class-gtkentrycompletion.html" title="gtk.EntryCompletion"><tt class="classname">gtk.EntryCompletion</tt></a>
specified by <i class="parameter"><tt>completion</tt></i> to be the auxiliary
completion object to use with the entry. All further configuration of the
completion mechanism is done using <i class="parameter"><tt>completion</tt></i> and the
<a href="class-gtkentrycompletion.html" title="gtk.EntryCompletion"><tt class="classname">gtk.EntryCompletion</tt></a>
methods.</p></div><div class="refsect2" lang="en"><a name="method-gtkentry--get-completion"></a><h3>gtk.Entry.get_completion</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_completion</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 auxiliary completion object</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_completion</tt>() method returns the
<a href="class-gtkentrycompletion.html" title="gtk.EntryCompletion"><tt class="classname">gtk.EntryCompletion</tt></a>
object currently in use by the entry.</p></div></div><div class="refsect1" lang="en"><a name="id3407223"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="signal-gtkentry--activate"></a><h3>The "activate" gtk.Entry 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>entry</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>entry</tt></i>:</span></td><td>the entry 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 "activate" signal is emitted when the entry is activated
either by user action (pressing the <span><b class="keycap">Enter</b></span> key) or
programmatically with the <a href="class-gtkwidget.html#method-gtkwidget--activate" title="gtk.Widget.activate"><tt class="methodname">gtk.Widget.activate</tt>()</a>
method</p></div><div class="refsect2" lang="en"><a name="signal-gtkentry--copy-clipboard"></a><h3>The "copy-clipboard" gtk.Entry 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>entry</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>entry</tt></i>:</span></td><td>the entry 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 "copy-clipboard" signal is emitted when the selection text
in the entry is copied to the clipboard.</p></div><div class="refsect2" lang="en"><a name="signal-gtkentry--cut-clipboard"></a><h3>The "cut-clipboard" gtk.Entry 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>entry</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>entry</tt></i>:</span></td><td>the entry 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 "cut-clipboard" signal is emitted when the selection in the
entry is cut (removed from the entry) and placed in the clipboard.</p></div><div class="refsect2" lang="en"><a name="signal-gtkentry--delete-from-cursor"></a><h3>The "delete-from-cursor" gtk.Entry 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>entry</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>delete_type</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>count</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>entry</tt></i>:</span></td><td>the entry that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>delete_type</tt></i>:</span></td><td>the type of deletion</td></tr><tr><td><span class="term"><i class="parameter"><tt>count</tt></i>:</span></td><td>the number of deletions of the type to
perform</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 "delete-from-cursor" signal is emitted when the a deletion
from the cursor i.e. removal o text at the cursor position, either before it
(negative <i class="parameter"><tt>count</tt></i>) or after it (positive
<i class="parameter"><tt>count</tt></i>). The value of
<i class="parameter"><tt>delete_type</tt></i> can be one of:</p><div class="itemizedlist"><ul type="disc"><li>gtk.DELETE_CHARS</li><li>gtk.DELETE_WORD_ENDS</li><li> gtk.DELETE_WORDS</li><li> gtk.DELETE_DISPLAY_LINES</li><li> gtk.DELETE_DISPLAY_LINE_ENDS</li><li> gtk.DELETE_PARAGRAPH_ENDS</li><li> gtk.DELETE_PARAGRAPHS</li><li> gtk.DELETE_WHITESPACE</li></ul></div></div><div class="refsect2" lang="en"><a name="signal-gtkentry--insert-at-cursor"></a><h3>The "insert-at-cursor" gtk.Entry 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>entry</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>string</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>entry</tt></i>:</span></td><td>the entry that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>string</tt></i>:</span></td><td>the text being inserted in the
entry</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 "insert-at-cursor" signal is emitted when text is being
inserted in the entry.</p></div><div class="refsect2" lang="en"><a name="signal-gtkentry--move-cursor"></a><h3>The "move-cursor" gtk.Entry 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>entry</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>step</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>count</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>extend_selection</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>entry</tt></i>:</span></td><td>the entry that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>step</tt></i>:</span></td><td>the size of the step to move the
cursor</td></tr><tr><td><span class="term"><i class="parameter"><tt>count</tt></i>:</span></td><td>the number of steps to move the
cursor</td></tr><tr><td><span class="term"><i class="parameter"><tt>extend_selection</tt></i>:</span></td><td>if TRUE extend the selection as well as moving
the cursor</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 "move-cursor" signal is emitted when the cursor is being
moved by <i class="parameter"><tt>count</tt></i> steps of size
<i class="parameter"><tt>step</tt></i>. If <i class="parameter"><tt>extend_selection</tt></i> is
<tt class="literal">TRUE</tt> the selection is extended as the cursor is being
moved. The value of <i class="parameter"><tt>step</tt></i> can be one of:</p><div class="itemizedlist"><ul type="disc"><li>gtk.MOVEMENT_LOGICAL_POSITIONS</li><li>gtk.MOVEMENT_VISUAL_POSITIONS</li><li> gtk.MOVEMENT_WORDS</li><li> gtk.MOVEMENT_DISPLAY_LINES</li><li> gtk.MOVEMENT_DISPLAY_LINE_ENDS</li><li> gtk.MOVEMENT_PARAGRAPH_ENDS</li><li> gtk.MOVEMENT_PARAGRAPHS</li><li> gtk.MOVEMENT_PAGES</li><li> gtk.MOVEMENT_BUFFER_ENDS</li></ul></div></div><div class="refsect2" lang="en"><a name="signal-gtkentry--paste-clipboard"></a><h3>The "paste-clipboard" gtk.Entry 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>entry</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>entry</tt></i>:</span></td><td>the entry 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 "paste-clipboard" signal is emitted when the contents of the
clipboard are pasted into the entry.</p></div><div class="refsect2" lang="en"><a name="signal-gtkentry--populate-popup"></a><h3>The "populate-popup" gtk.Entry 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>entry</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>menu</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>entry</tt></i>:</span></td><td>the entry that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>menu</tt></i>:</span></td><td>the menu that needs
populating</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 "populate-popup" signal is emitted when the
<i class="parameter"><tt>menu</tt></i> needs populating.</p></div><div class="refsect2" lang="en"><a name="signal-gtkentry--toggle-overwrite"></a><h3>The "toggle-overwrite" gtk.Entry 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>entry</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>entry</tt></i>:</span></td><td>the entry 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 "toggle-overwrite" signal is emitted when the internal entry
attribute "overwrite_mode" is toggled by pressing the
<span><b class="keycap">Insert</b></span> key.</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-gtkeditable.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-gtkentrycompletion.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.Editable</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">gtk.EntryCompletion</td></tr></table></div></body></html>
|