1ttk::spinbox(n) Tk Themed Widget ttk::spinbox(n)
2
3
4
5______________________________________________________________________________
6
8 ttk::spinbox - Selecting text field widget
9
11 ttk::spinbox pathName ?options?
12_________________________________________________________________
13
15 A ttk::spinbox widget is a ttk::entry widget with built-in up and down
16 buttons that are used to either modify a numeric value or to select
17 among a set of values. The widget implements all the features of the
18 ttk::entry widget including support of the -textvariable option to link
19 the value displayed by the widget to a Tcl variable.
20
22 -class -cursor -style
23 -takefocus -xscrollcommand
24
25 See the ttk_widget manual entry for details on the standard options.
26
28 -validate -validatecommand
29
30 See the ttk_entry manual entry for details on the standard options.
31
33 [-from from] A floating-point value specifying the lowest value for the
34 spinbox. This is used in conjunction with -to and -increment to set a
35 numerical range. [-to to] A floating-point value specifying the high‐
36 est permissible value for the widget. See also -from and -increment.
37 range. [-increment increment] A floating-point value specifying the
38 change in value to be applied each time one of the widget spin buttons
39 is pressed. The up button applies a positive increment, the down button
40 applies a negative increment. [-values values] This must be a Tcl list
41 of values. If this option is set then this will override any range set
42 using the -from, -to and -increment options. The widget will instead
43 use the values specified beginning with the first value. [-wrap wrap]
44 Must be a proper boolean value. If on, the spinbox will wrap around
45 the values of data in the widget. [-format format] Specifies an alter‐
46 nate format to use when setting the string value when using the -from
47 and -to range. This must be a format specifier of the form
48 %<pad>.<pad>f, as it will format a floating-point number. [-com‐
49 mand command] Specifies a Tcl command to be invoked whenever a spinbut‐
50 ton is invoked.
51
53 See the ttk::entry manual for information about indexing characters.
54
56 See the ttk::entry manual for information about using the -validate and
57 -validatecommand options.
58
60 The following subcommands are possible for spinbox widgets in addition
61 to the commands described for the ttk::entry widget:
62
63 pathName current index
64
65 pathName get
66 Returns the spinbox's current value.
67
68 pathName set value
69 Set the spinbox string to value. If a -format option has been
70 configured then this format will be applied. If formatting fails
71 or is not set or the -values option has been used then the value
72 is set directly.
73
75 ttk::widget(n), ttk::entry(n), spinbox(n)
76
78 entry, spinbox, widget, text field
79
80
81
82Tk 8.5.9 ttk::spinbox(n)