1 |
578 |
markom |
<HTML>
|
2 |
|
|
<HEAD>
|
3 |
|
|
<TITLE>iwidgets2.2.0 User Commands - spinint</TITLE>
|
4 |
|
|
</HEAD>
|
5 |
|
|
<BODY BGCOLOR="#FFFFFF">
|
6 |
|
|
<H1>iwidgets2.2.0 User Commands - spinint</H1>
|
7 |
|
|
<HR>
|
8 |
|
|
<PRE>
|
9 |
|
|
|
10 |
|
|
</PRE>
|
11 |
|
|
<H2><HR ALIGN=LEFT WIDTH=70% SIZE=3></H2><PRE>
|
12 |
|
|
|
13 |
|
|
|
14 |
|
|
</PRE>
|
15 |
|
|
<H2>NAME</H2><PRE>
|
16 |
|
|
spinint - Create and manipulate a integer spinner widget
|
17 |
|
|
|
18 |
|
|
|
19 |
|
|
</PRE>
|
20 |
|
|
<H2>SYNOPSIS</H2><PRE>
|
21 |
|
|
<STRONG>spinint</STRONG> <EM>pathName</EM> ?<EM>options</EM>?
|
22 |
|
|
|
23 |
|
|
|
24 |
|
|
</PRE>
|
25 |
|
|
<H2>INHERITANCE</H2><PRE>
|
26 |
|
|
itk::Widget <- Labeledwidget <- Spinner <- Spinint
|
27 |
|
|
|
28 |
|
|
|
29 |
|
|
</PRE>
|
30 |
|
|
<H2>STANDARD OPTIONS</H2><PRE>
|
31 |
|
|
<STRONG>background</STRONG> <STRONG>borderWidth</STRONG> <STRONG>cursor</STRONG> <STRONG>exportSelection</STRONG>
|
32 |
|
|
<STRONG>foreground</STRONG> <STRONG>highlightColor</STRONG> <STRONG>highlightThicknessinsertBackground</STRONG>
|
33 |
|
|
<STRONG>insertBorderWidth</STRONG> <STRONG>insertOffTime</STRONG> <STRONG>insertOnTimeinsertWidth</STRONG>
|
34 |
|
|
<STRONG>justify</STRONG> <STRONG>relief</STRONG> <STRONG>selectBackgroundselectBorderWidth</STRONG>
|
35 |
|
|
<STRONG>selectForeground</STRONG> <STRONG>textVariable</STRONG>
|
36 |
|
|
|
37 |
|
|
See the "options" manual entry for details on the standard
|
38 |
|
|
options.
|
39 |
|
|
|
40 |
|
|
|
41 |
|
|
</PRE>
|
42 |
|
|
<H2>ASSOCIATED OPTIONS</H2><PRE>
|
43 |
|
|
<STRONG>show</STRONG> <STRONG>state</STRONG>
|
44 |
|
|
|
45 |
|
|
See the "entry" manual entry for details on the associated
|
46 |
|
|
options.
|
47 |
|
|
|
48 |
|
|
|
49 |
|
|
</PRE>
|
50 |
|
|
<H2>INHERITED OPTIONS</H2><PRE>
|
51 |
|
|
<STRONG>command</STRONG> <STRONG>childSitePos</STRONG> <STRONG>fixed</STRONG> <STRONG>focusCommand</STRONG>
|
52 |
|
|
<STRONG>invalid</STRONG> <STRONG>textBackground</STRONG> <STRONG>textFont</STRONG> <STRONG>validate</STRONG>
|
53 |
|
|
<STRONG>width</STRONG>
|
54 |
|
|
|
55 |
|
|
See the "entryfield" widget manual entry for details on the
|
56 |
|
|
above inherited options.
|
57 |
|
|
|
58 |
|
|
<STRONG>labelBitmap</STRONG> <STRONG>labelFont</STRONG> <STRONG>labelImage</STRONG> <STRONG>labelMargin</STRONG>
|
59 |
|
|
<STRONG>labelPos</STRONG> <STRONG>labelText</STRONG> <STRONG>labelVariable</STRONG>
|
60 |
|
|
|
61 |
|
|
See the "labeledwidget" widget manual entry for details on
|
62 |
|
|
the above inherited options.
|
63 |
|
|
|
64 |
|
|
<STRONG>arroworient</STRONG> <STRONG>decrement</STRONG> <STRONG>increment</STRONG> <STRONG>repeatDelay</STRONG>
|
65 |
|
|
<STRONG>repeatInterval</STRONG>
|
66 |
|
|
|
67 |
|
|
See the "spinner" widget manual entry for details on the
|
68 |
|
|
above inherited options.
|
69 |
|
|
|
70 |
|
|
|
71 |
|
|
|
72 |
|
|
</PRE>
|
73 |
|
|
<H2>WIDGET-SPECIFIC OPTIONS</H2><PRE>
|
74 |
|
|
Name: <STRONG>range</STRONG>
|
75 |
|
|
Class: <STRONG>Range</STRONG>
|
76 |
|
|
Command-Line Switch: <STRONG>-range</STRONG>
|
77 |
|
|
Specifies a two element list of minimum and maximum
|
78 |
|
|
integer values. The default is no range, {{} {}}.
|
79 |
|
|
|
80 |
|
|
Name: <STRONG>step</STRONG>
|
81 |
|
|
Class: <STRONG>Step</STRONG>
|
82 |
|
|
Command-Line Switch: <STRONG>-step</STRONG>
|
83 |
|
|
|
84 |
|
|
Specifies the increment/decrement value. The default
|
85 |
|
|
is 1.
|
86 |
|
|
|
87 |
|
|
Name: <STRONG>wrap</STRONG>
|
88 |
|
|
Class: <STRONG>Wrap</STRONG>
|
89 |
|
|
Command-Line Switch: <STRONG>-wrap</STRONG>
|
90 |
|
|
|
91 |
|
|
Specifies whether to wrap the spinner value upon reach-
|
92 |
|
|
ing the minimum or maximum value in any of the forms
|
93 |
|
|
acceptable to <STRONG>Tcl_GetBoolean</STRONG>. The default is true.
|
94 |
|
|
|
95 |
|
|
|
96 |
|
|
</PRE>
|
97 |
|
|
<H2><HR ALIGN=LEFT WIDTH=70% SIZE=3></H2><PRE>
|
98 |
|
|
|
99 |
|
|
|
100 |
|
|
|
101 |
|
|
</PRE>
|
102 |
|
|
<H2>DESCRIPTION</H2><PRE>
|
103 |
|
|
The <STRONG>spinint</STRONG> command creates a spinint widget. The spinint
|
104 |
|
|
allows "spinning" of integer values within a specified range
|
105 |
|
|
with wrap support. The spinner arrows may be drawn horizon-
|
106 |
|
|
tally or vertically.
|
107 |
|
|
|
108 |
|
|
|
109 |
|
|
|
110 |
|
|
|
111 |
|
|
</PRE>
|
112 |
|
|
<H2>METHODS</H2><PRE>
|
113 |
|
|
The <STRONG>spinint</STRONG> command creates a new Tcl command whose name is
|
114 |
|
|
<EM>pathName</EM>. This command may be used to invoke various opera-
|
115 |
|
|
tions on the widget. It has the following general form:
|
116 |
|
|
|
117 |
|
|
<EM>pathName</EM> <EM>option</EM> ?<EM>arg</EM> <EM>arg</EM> ...?
|
118 |
|
|
|
119 |
|
|
<EM>Option</EM> and the <EM>arg</EM>s determine the exact behavior of the com-
|
120 |
|
|
mand. The following commands are possible for spinint widg-
|
121 |
|
|
ets:
|
122 |
|
|
|
123 |
|
|
|
124 |
|
|
</PRE>
|
125 |
|
|
<H2>ASSOCIATED METHODS</H2><PRE>
|
126 |
|
|
<STRONG>delete</STRONG> <STRONG>get</STRONG> <STRONG>icursor</STRONG> <STRONG>index</STRONG>
|
127 |
|
|
<STRONG>insert</STRONG> <STRONG>peek</STRONG> <STRONG>scan</STRONG> <STRONG>selection</STRONG>
|
128 |
|
|
<STRONG>xview</STRONG>
|
129 |
|
|
|
130 |
|
|
See the "entry" manual entry for details on the associated
|
131 |
|
|
methods.
|
132 |
|
|
|
133 |
|
|
|
134 |
|
|
</PRE>
|
135 |
|
|
<H2>INHERITED METHODS</H2><PRE>
|
136 |
|
|
<STRONG>childsite</STRONG> <STRONG>clear</STRONG>
|
137 |
|
|
|
138 |
|
|
|
139 |
|
|
See the "entryfield" manual entry for details on the associ-
|
140 |
|
|
ated methods.
|
141 |
|
|
|
142 |
|
|
|
143 |
|
|
</PRE>
|
144 |
|
|
<H2>WIDGET-SPECIFIC METHODS</H2><PRE>
|
145 |
|
|
<EM>pathName</EM> <STRONG>cget</STRONG> <EM>option</EM>
|
146 |
|
|
Returns the current value of the configuration option
|
147 |
|
|
given by <EM>option</EM>. <EM>Option</EM> may have any of the values
|
148 |
|
|
accepted by the <STRONG>spinint</STRONG> command.
|
149 |
|
|
|
150 |
|
|
<EM>pathName</EM> <STRONG>configure</STRONG> ?<EM>option</EM>? ?<EM>value</EM> <EM>option</EM> <EM>value</EM> ...?
|
151 |
|
|
Query or modify the configuration options of the
|
152 |
|
|
widget. If no <EM>option</EM> is specified, returns a list
|
153 |
|
|
describing all of the available options for <EM>pathName</EM>
|
154 |
|
|
(see <STRONG>Tk_ConfigureInfo</STRONG> for information on the format of
|
155 |
|
|
this list). If <EM>option</EM> is specified with no <EM>value</EM>, then
|
156 |
|
|
the command returns a list describing the one named
|
157 |
|
|
option (this list will be identical to the correspond-
|
158 |
|
|
ing sublist of the value returned if no <EM>option</EM> is
|
159 |
|
|
specified). If one or more <EM>option</EM> - <EM>value</EM> pairs are
|
160 |
|
|
specified, then the command modifies the given widget
|
161 |
|
|
option(s) to have the given value(s); in this case the
|
162 |
|
|
command returns an empty string. <EM>Option</EM> may have any
|
163 |
|
|
of the values accepted by the <STRONG>spinint</STRONG> command.
|
164 |
|
|
|
165 |
|
|
<EM>pathName</EM> <STRONG>down</STRONG>
|
166 |
|
|
Decrement the spinner value by the value given in the
|
167 |
|
|
step option.
|
168 |
|
|
|
169 |
|
|
<EM>pathName</EM> <STRONG>up</STRONG>
|
170 |
|
|
Increment the spinner value by the value given in the
|
171 |
|
|
step option.
|
172 |
|
|
|
173 |
|
|
|
174 |
|
|
|
175 |
|
|
</PRE>
|
176 |
|
|
<H2>COMPONENTS</H2><PRE>
|
177 |
|
|
See the "Spinner" widget manual entry for details on
|
178 |
|
|
the integer spinner component items.
|
179 |
|
|
|
180 |
|
|
|
181 |
|
|
|
182 |
|
|
</PRE>
|
183 |
|
|
<H2>EXAMPLE</H2><PRE>
|
184 |
|
|
option add *textBackground white
|
185 |
|
|
|
186 |
|
|
spinint .si -labeltext "Temperature" -labelpos w \
|
187 |
|
|
-fixed yes -width 5 -range {32 212}
|
188 |
|
|
|
189 |
|
|
pack .si -pady 10
|
190 |
|
|
|
191 |
|
|
|
192 |
|
|
|
193 |
|
|
</PRE>
|
194 |
|
|
<H2>AUTHOR</H2><PRE>
|
195 |
|
|
Sue Yockey
|
196 |
|
|
|
197 |
|
|
|
198 |
|
|
</PRE>
|
199 |
|
|
<H2>KEYWORDS</H2><PRE>
|
200 |
|
|
spinint, widget
|
201 |
|
|
</PRE>
|
202 |
|
|
</BODY>
|
203 |
|
|
</HTML>
|