<HTML> <HEAD><TITLE>SpinBox</TITLE></HEAD> <BODY BGCOLOR=white> <DL><DT><I><A HREF="#descr">NAME</A></I></DT> <DD><B>SpinBox</B> - SpinBox widget </DD></DL> <DL> <DT><I>CREATION</I></DT> <DD><A HREF="#descr"><B>SpinBox</B></A> <I>pathName</I> ?<I>option value...</I>?</DD> </DL> <DL> <DT><I><A HREF="ArrowButton.html">OPTIONS from <B>ArrowButton</B></A></I></DT> <DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0> <TR> <TD> -background or -bg</TD> <TD> -disabledforeground</TD> </TR> <TR> <TD> -foreground or -fg</TD> <TD> -repeatdelay</TD> </TR> <TR> <TD> -repeatinterval</TD> <TD> -state</TD> </TR> </TABLE></DD> </DL> <DL> <DT><I><A HREF="Entry.html">OPTIONS from <B>Entry</B></A></I></DT> <DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0> <TR> <TD> -command</TD> <TD> -disabledforeground</TD> </TR> <TR> <TD> -dragenabled</TD> <TD> -dragendcmd</TD> </TR> <TR> <TD> -dragevent</TD> <TD> -draginitcmd</TD> </TR> <TR> <TD> -dragtype</TD> <TD> -dropcmd</TD> </TR> <TR> <TD> -dropenabled</TD> <TD> -dropovercmd</TD> </TR> <TR> <TD> -droptypes</TD> <TD> -editable</TD> </TR> <TR> <TD> -entrybg (see <B>-background</B>)</TD> <TD> -entryfg (see <B>-foreground</B>)</TD> </TR> <TR> <TD> -exportselection</TD> <TD> -font</TD> </TR> <TR> <TD> -helptext</TD> <TD> -helptype</TD> </TR> <TR> <TD> -helpvar</TD> <TD> -highlightbackground</TD> </TR> <TR> <TD> -highlightcolor</TD> <TD> -highlightthickness</TD> </TR> <TR> <TD> -insertbackground</TD> <TD> -insertborderwidth</TD> </TR> <TR> <TD> -insertofftime</TD> <TD> -insertontime</TD> </TR> <TR> <TD> -insertwidth</TD> <TD> -justify</TD> </TR> <TR> <TD> -selectbackground</TD> <TD> -selectborderwidth</TD> </TR> <TR> <TD> -selectforeground</TD> <TD> -show</TD> </TR> <TR> <TD> -state</TD> <TD> -takefocus</TD> </TR> <TR> <TD> -text</TD> <TD> -textvariable</TD> </TR> <TR> <TD> -width</TD> <TD> -xscrollcommand</TD> </TR> </TABLE></DD> </DL> <DL> <DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT> <DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0> <TR> <TD> <A HREF="#-modifycmd">-modifycmd</A></TR> <TD> <A HREF="#-range">-range</A></TR> </TR> <TR> <TD> <A HREF="#-values">-values</A></TR> </TABLE></DD> </DL> <DL> <DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT> <DD><I>pathName</I> <A HREF="#bind"><B>bind</B></A> ?<I>arg...</I>? </DD> <DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A> <I>option</I> </DD> <DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A> ?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...? </DD> <DD><I>pathName</I> <A HREF="#getvalue"><B>getvalue</B></A> </DD> <DD><I>pathName</I> <A HREF="#setvalue"><B>setvalue</B></A> <I>index</I> </DD> </DL> <BR><HR WIDTH="100%"><BR> <B><A NAME="descr"></A>DESCRIPTION</B><BR> <P> SpinBox widget enables the user to select a value among a list given by the <B>values</B> option or a set of values defined by a mininum, a maximum and an increment. Notice that <B>range</B> option defines a list of values, so <B>getvalue</B> and <B>setvalue</B> work with both values and range. </P> <BR><HR WIDTH="50%"><BR> <B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR> <DL><DT><A NAME="-modifycmd"><B>-modifycmd</B></A></DT> <DD> Specifies a Tcl command called when the user modify the value of the SpinBox. </DD> </DL> <DL><DT><A NAME="-range"><B>-range</B></A></DT> <DD> Specifies a list of three intergers (or real) describing the minimum, maximum and increment of the SpinBox. </DD> </DL> <DL><DT><A NAME="-values"><B>-values</B></A></DT> <DD> Specifies the values accepted by the SpinBox. This option takes precedence over <B>range</B> option. </DD> </DL> <HR WIDTH="50%"><BR> <B><A NAME="wc">WIDGET COMMAND</A></B><BR> <DL><DT><A NAME="bind"><I>pathName</I> <B>bind</B></A> ?<I>arg...</I>? </DT><DD> Set bindings on the entry widget. </DD></DL> <DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A> <I>option</I> </DT><DD> Returns the current value of the configuration option given by <I>option</I>. <I>Option</I> may have any of the values accepted by the creation command. </DD></DL> <DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A> ?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...? </DT><DD> Query or modify the configuration options of the widget. If no <I>option</I> is specified, returns a list describing all of the available options for <I>pathName</I>. If <I>option</I> is specified with no <I>value</I>, then the command returns a list describing the one named <I>option</I> (this list will be identical to the corresponding sublist of the value returned if no <I>option</I> is specified). If one or more <I>option-value</I> pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. <I>Option</I> may have any of the values accepted by the creation command. Read-only options are not be modified. </DD></DL> <DL><DT><A NAME="getvalue"><I>pathName</I> <B>getvalue</B></A> </DT><DD> Returns the index of the current text of the SpinBox in the list of values, or -1 if it doesn't match any value. </DD></DL> <DL><DT><A NAME="setvalue"><I>pathName</I> <B>setvalue</B></A> <I>index</I> </DT><DD> Set the text of the SpinBox to the value indicated by <I>index</I> in the list of values. <I>index</I> may be specified in any of the following forms: <P> <DL COMPACT> <DT> <B>last</B> <DD> Specifies the last element of the list of values. <DT><B>first</B> <DD> Specifies the first element of the list of values. <DT> <B>next</B> <DD> Specifies the element following the current (ie returned by <B>getvalue</B>) in the list of values. <DT><B>previous</B> <DD> Specifies the element preceding the current (ie returned by <B>getvalue</B>) in the list of values. <DT> @<I>number</I> <DD> Specifies the integer index in the list of values. </DL> </DD></DL> <HR><BR><B>BINDINGS</B><BR><BR> When Entry of the SpinBox has the input focus, it has the following bindings, in addition to the default Entry bindings: <UL> <LI>Page up set the value of the SpinBox to the last value. <LI>Page down set the value of the SpinBox to the first value. <LI>Arrow up set the value of the SpinBox to the next value. <LI>Arrow down set the value of the SpinBox to the previous value. </UL> </BODY></HTML>