1
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.SpinButton</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-gtksocket.html" title="gtk.Socket"><link rel="next" href="class-gtkstatusbar.html" title="gtk.Statusbar"></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.SpinButton</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtksocket.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkstatusbar.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtkspinbutton"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.SpinButton</h2><p>gtk.SpinButton — retrieve an integer or floating-point number from the
2
user.</p></div><div class="refsect1" lang="en"><a name="id3659503"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.SpinButton</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkentry.html" title="gtk.Entry">gtk.Entry</a></span></span>):
3
<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gtkspinbutton.html#constructor-gtkspinbutton" title="Constructor">gtk.SpinButton</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>adjustment</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>climb_rate</code></strong></span><span class="initializer">=0.0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>digits</code></strong></span><span class="initializer">=0</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--configure" title="gtk.SpinButton.configure">configure</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>adjustment</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>climb_rate</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>digits</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--set-adjustment" title="gtk.SpinButton.set_adjustment">set_adjustment</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>adjustment</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--get-adjustment" title="gtk.SpinButton.get_adjustment">get_adjustment</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--set-digits" title="gtk.SpinButton.set_digits">set_digits</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>digits</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--get-digits" title="gtk.SpinButton.get_digits">get_digits</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--set-increments" title="gtk.SpinButton.set_increments">set_increments</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>step</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>page</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--get-increments" title="gtk.SpinButton.get_increments">get_increments</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--set-range" title="gtk.SpinButton.set_range">set_range</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>min</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>max</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--get-range" title="gtk.SpinButton.get_range">get_range</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--get-value" title="gtk.SpinButton.get_value">get_value</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--get-value-as-int" title="gtk.SpinButton.get_value_as_int">get_value_as_int</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--set-value" title="gtk.SpinButton.set_value">set_value</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--set-update-policy" title="gtk.SpinButton.set_update_policy">set_update_policy</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>policy</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--get-update-policy" title="gtk.SpinButton.get_update_policy">get_update_policy</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--set-numeric" title="gtk.SpinButton.set_numeric">set_numeric</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>numeric</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--get-numeric" title="gtk.SpinButton.get_numeric">get_numeric</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--spin" title="gtk.SpinButton.spin">spin</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>direction</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>increment</code></strong></span><span class="initializer">=1.0</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--set-wrap" title="gtk.SpinButton.set_wrap">set_wrap</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>wrap</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--get-wrap" title="gtk.SpinButton.get_wrap">get_wrap</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--set-snap-to-ticks" title="gtk.SpinButton.set_snap_to_ticks">set_snap_to_ticks</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>snap_to_ticks</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--get-snap-to-ticks" title="gtk.SpinButton.get_snap_to_ticks">get_snap_to_ticks</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--update" title="gtk.SpinButton.update">update</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3660193"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
2
user.</p></div><div class="refsect1" lang="en"><a name="id3860308"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.SpinButton</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkentry.html" title="gtk.Entry">gtk.Entry</a></span></span>):
3
<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gtkspinbutton.html#constructor-gtkspinbutton" title="Constructor">gtk.SpinButton</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>adjustment</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>climb_rate</code></strong></span><span class="initializer">=0.0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>digits</code></strong></span><span class="initializer">=0</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--configure" title="gtk.SpinButton.configure">configure</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>adjustment</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>climb_rate</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>digits</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--set-adjustment" title="gtk.SpinButton.set_adjustment">set_adjustment</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>adjustment</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--get-adjustment" title="gtk.SpinButton.get_adjustment">get_adjustment</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--set-digits" title="gtk.SpinButton.set_digits">set_digits</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>digits</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--get-digits" title="gtk.SpinButton.get_digits">get_digits</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--set-increments" title="gtk.SpinButton.set_increments">set_increments</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>step</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>page</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--get-increments" title="gtk.SpinButton.get_increments">get_increments</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--set-range" title="gtk.SpinButton.set_range">set_range</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>min</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>max</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--get-range" title="gtk.SpinButton.get_range">get_range</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--get-value" title="gtk.SpinButton.get_value">get_value</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--get-value-as-int" title="gtk.SpinButton.get_value_as_int">get_value_as_int</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--set-value" title="gtk.SpinButton.set_value">set_value</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--set-update-policy" title="gtk.SpinButton.set_update_policy">set_update_policy</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>policy</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--get-update-policy" title="gtk.SpinButton.get_update_policy">get_update_policy</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--set-numeric" title="gtk.SpinButton.set_numeric">set_numeric</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>numeric</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--get-numeric" title="gtk.SpinButton.get_numeric">get_numeric</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--spin" title="gtk.SpinButton.spin">spin</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>direction</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>increment</code></strong></span><span class="initializer">=1.0</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--set-wrap" title="gtk.SpinButton.set_wrap">set_wrap</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>wrap</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--get-wrap" title="gtk.SpinButton.get_wrap">get_wrap</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--set-snap-to-ticks" title="gtk.SpinButton.set_snap_to_ticks">set_snap_to_ticks</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>snap_to_ticks</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--get-snap-to-ticks" title="gtk.SpinButton.get_snap_to_ticks">get_snap_to_ticks</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--update" title="gtk.SpinButton.update">update</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3860998"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
4
4
+-- <a class="link" href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
5
5
+-- <a class="link" href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a>
6
6
+-- <a class="link" href="class-gtkentry.html" title="gtk.Entry">gtk.Entry</a> (implements <a class="link" href="class-gtkeditable.html" title="gtk.Editable">gtk.Editable</a>, <a class="link" href="class-gtkcelleditable.html" title="gtk.CellEditable">gtk.CellEditable</a>)
7
7
+-- <a class="link" href="class-gtkspinbutton.html" title="gtk.SpinButton">gtk.SpinButton</a>
8
</pre></div><div class="refsect1" lang="en"><a name="id3660251"></a><h2>Implemented Interfaces</h2><p>
8
</pre></div><div class="refsect1" lang="en"><a name="id3861056"></a><h2>Implemented Interfaces</h2><p>
9
9
<a class="link" href="class-gtkspinbutton.html" title="gtk.SpinButton"><code class="classname">gtk.SpinButton</code></a>
11
11
<a class="link" href="class-gtkbuildable.html" title="gtk.Buildable"><code class="classname">gtk.Buildable</code></a>
19
19
upon reaching its limits</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="style-properties-gtkspinbutton"></a><h2>gtk.SpinButton 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-gtkentry.html#style-properties-gtkentry" title="gtk.Entry Style Properties">gtk.Entry Style 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">"shadow-type"</td><td valign="top">Read</td><td valign="top">the shadow type of the spinbutton - one of:
20
20
<code class="literal">gtk.SHADOW_NONE</code>, <code class="literal">gtk.SHADOW_IN</code>,
21
21
<code class="literal">gtk.SHADOW_OUT</code>, <code class="literal">gtk.SHADOW_ETCHED_IN</code>
22
or <code class="literal">gtk.SHADOW_ETCHED_OUT</code></td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="signal-prototypes-gtkspinbutton"></a><h2>gtk.SpinButton 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-gtkentry.html#signal-prototypes-gtkentry" title="gtk.Entry Signal Prototypes">gtk.Entry Signal Prototypes</a></p><p><a class="link" href="class-gtkeditable.html#signal-prototypes-gtkeditable" title="gtk.Editable Signal Prototypes">gtk.Editable 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><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">"<a class="link" href="class-gtkspinbutton.html#signal-gtkspinbutton--change-value" title='The "change-value" gtk.SpinButton Signal'>change-value</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>spinbutton</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>scrolltype</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term">"<a class="link" href="class-gtkspinbutton.html#signal-gtkspinbutton--input" title='The "input" gtk.SpinButton Signal'>input</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>spinbutton</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>value_ptr</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term">"<a class="link" href="class-gtkspinbutton.html#signal-gtkspinbutton--output" title='The "output" gtk.SpinButton Signal'>output</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>spinbutton</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term">"<a class="link" href="class-gtkspinbutton.html#signal-gtkspinbutton--value-changed" title='The "value-changed" gtk.SpinButton Signal'>value-changed</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>spinbutton</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term">"<a class="link" href="class-gtkspinbutton.html#signal-gtkspinbutton--wrapped" title='The "wrapped" gtk.SpinButton Signal'>wrapped</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>spinbutton</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" lang="en"><a name="id3661041"></a><h2>Description</h2><p>A <a class="link" href="class-gtkspinbutton.html" title="gtk.SpinButton"><code class="classname">gtk.SpinButton</code></a>
22
or <code class="literal">gtk.SHADOW_ETCHED_OUT</code></td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="signal-prototypes-gtkspinbutton"></a><h2>gtk.SpinButton 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-gtkentry.html#signal-prototypes-gtkentry" title="gtk.Entry Signal Prototypes">gtk.Entry Signal Prototypes</a></p><p><a class="link" href="class-gtkeditable.html#signal-prototypes-gtkeditable" title="gtk.Editable Signal Prototypes">gtk.Editable 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><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">"<a class="link" href="class-gtkspinbutton.html#signal-gtkspinbutton--change-value" title='The "change-value" gtk.SpinButton Signal'>change-value</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>spinbutton</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>scrolltype</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term">"<a class="link" href="class-gtkspinbutton.html#signal-gtkspinbutton--input" title='The "input" gtk.SpinButton Signal'>input</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>spinbutton</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>value_ptr</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term">"<a class="link" href="class-gtkspinbutton.html#signal-gtkspinbutton--output" title='The "output" gtk.SpinButton Signal'>output</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>spinbutton</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term">"<a class="link" href="class-gtkspinbutton.html#signal-gtkspinbutton--value-changed" title='The "value-changed" gtk.SpinButton Signal'>value-changed</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>spinbutton</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term">"<a class="link" href="class-gtkspinbutton.html#signal-gtkspinbutton--wrapped" title='The "wrapped" gtk.SpinButton Signal'>wrapped</a></span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>spinbutton</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" lang="en"><a name="id3861846"></a><h2>Description</h2><p>A <a class="link" href="class-gtkspinbutton.html" title="gtk.SpinButton"><code class="classname">gtk.SpinButton</code></a>
23
23
is a subclass of <a class="link" href="class-gtkentry.html" title="gtk.Entry"><code class="classname">gtk.Entry</code></a> that
24
24
provides a way for a user to set the value of some numeric attribute within
25
25
a predefined range. Rather than having to directly type a number into a
41
41
specified a new <a class="link" href="class-gtkadjustment.html" title="gtk.Adjustment"><code class="classname">gtk.Adjustment</code></a>
42
42
will be created. If <em class="parameter"><code>climb_rate</code></em> is not specified it
43
43
defaults to 0.0. If <em class="parameter"><code>digits</code></em> is not specified it
44
defaults to 0.</p></div><div class="refsect1" lang="en"><a name="id3661346"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtkspinbutton--configure"></a><h3>gtk.SpinButton.configure</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">configure</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>adjustment</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>climb_rate</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>digits</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>adjustment</code></strong> :</span></p></td><td>a <a class="link" href="class-gtkadjustment.html" title="gtk.Adjustment"><code class="classname">gtk.Adjustment</code></a>
44
defaults to 0.</p></div><div class="refsect1" lang="en"><a name="id3862151"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtkspinbutton--configure"></a><h3>gtk.SpinButton.configure</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">configure</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>adjustment</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>climb_rate</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>digits</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>adjustment</code></strong> :</span></p></td><td>a <a class="link" href="class-gtkadjustment.html" title="gtk.Adjustment"><code class="classname">gtk.Adjustment</code></a>
45
45
or None to create a new adjustment</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>climb_rate</code></strong> :</span></p></td><td>the acceleration factor</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>digits</code></strong> :</span></p></td><td>the number of decimal places to
46
46
display</td></tr></tbody></table><p>The <code class="methodname">configure</code>() method changes the
47
47
properties of an existing spin button by associating the <a class="link" href="class-gtkadjustment.html" title="gtk.Adjustment"><code class="classname">gtk.Adjustment</code></a>
138
138
is <code class="literal">True</code> the input values are corrected to the nearest
139
139
step. See the <a class="link" href="class-gtkspinbutton.html#method-gtkspinbutton--set-snap-to-ticks" title="gtk.SpinButton.set_snap_to_ticks"><code class="methodname">set_snap_to_ticks</code>()</a>
140
140
method.</p></div><div class="refsect2" lang="en"><a name="method-gtkspinbutton--update"></a><h3>gtk.SpinButton.update</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">update</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">update</code>() method manually forces an
141
update of the spin button.</p></div></div><div class="refsect1" lang="en"><a name="id3663566"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="signal-gtkspinbutton--change-value"></a><h3>The "change-value" gtk.SpinButton Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>spinbutton</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>scrolltype</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></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"><em class="parameter"><code>spinbutton</code></em> :</span></p></td><td>the spinbutton that received the
141
update of the spin button.</p></div></div><div class="refsect1" lang="en"><a name="id3864372"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="signal-gtkspinbutton--change-value"></a><h3>The "change-value" gtk.SpinButton Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>spinbutton</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>scrolltype</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></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"><em class="parameter"><code>spinbutton</code></em> :</span></p></td><td>the spinbutton that received the
142
142
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>scrolltype</code></em> :</span></p></td><td>the scrolltype:
143
143
<code class="literal">gtk.SCROLL_STEP_UP</code>,
144
144
<code class="literal">gtk.SCROLL_STEP_DOWN</code>,