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 -state-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 Command-Line Name:-command
34 Database Name: command
35 Database Class: Command
36
37 Specifies a Tcl command to be invoked whenever a spinbutton is
38 invoked.
39
40 Command-Line Name:-format
41 Database Name: format
42 Database Class: Format
43
44 Specifies an alternate format to use when setting the string
45 value when using the -from and -to range. This must be a format
46 specifier of the form %<pad>.<pad>f, as it will format a float‐
47 ing-point number.
48
49 Command-Line Name:-from
50 Database Name: from
51 Database Class: From
52
53 A floating-point value specifying the lowest value for the spin‐
54 box. This is used in conjunction with -to and -increment to set
55 a numerical range.
56
57 Command-Line Name:-increment
58 Database Name: increment
59 Database Class: Increment
60
61 A floating-point value specifying the change in value to be
62 applied each time one of the widget spin buttons is pressed. The
63 up button applies a positive increment, the down button applies
64 a negative increment.
65
66 Command-Line Name:-to
67 Database Name: to
68 Database Class: To
69
70 A floating-point value specifying the highest permissible value
71 for the widget. See also -from and -increment. range.
72
73 Command-Line Name:-values
74 Database Name: values
75 Database Class: Values
76
77 This must be a Tcl list of values. If this option is set then
78 this will override any range set using the -from, -to and
79 -increment options. The widget will instead use the values spec‐
80 ified beginning with the first value.
81
82 Command-Line Name:-wrap
83 Database Name: wrap
84 Database Class: Wrap
85
86 Must be a proper boolean value. If on, the spinbox will wrap
87 around the values of data in the widget.
88
90 See the ttk::entry manual for information about indexing characters.
91
93 See the ttk::entry manual for information about using the -validate and
94 -validatecommand options.
95
97 The following subcommands are possible for spinbox widgets in addition
98 to the commands described for the ttk::entry widget:
99
100 pathName get
101 Returns the spinbox's current value.
102
103 pathName set value
104 Set the spinbox string to value. If a -format option has been
105 configured then this format will be applied. If formatting fails
106 or is not set or the -values option has been used then the value
107 is set directly.
108
110 The spinbox widget generates a <<Increment>> virtual event when the
111 user presses <Up>, and a <<Decrement>> virtual event when the user
112 presses <Down>.
113
115 The class name for a ttk::spinbox is TSpinbox.
116
117 Dynamic states: active, disabled, focus, readonly.
118
119 TSpinbox styling options configurable with ttk::style are:
120
121 -arrowcolor color
122 -arrowsize amount
123 -background color
124 For backwards compatibility, when using the aqua theme (for mac‐
125 OS), this option behaves as an alias for the -fieldbackground
126 provided that no value is specified for -fieldbackground. Other‐
127 wise it is ignored.
128 -bordercolor color
129 -darkcolor color
130 -fieldbackground color
131 -foreground color
132 -lightcolor color
133 -padding padding
134 -selectbackground color
135 -selectforeground color
136
137 Some options are only available for specific themes.
138
139 See the ttk::style manual page for information on how to configure ttk
140 styles.
141
143 ttk::widget(n), ttk::entry(n), spinbox(n)
144
146 entry, spinbox, widget, text field
147
148
149
150Tk 8.5 ttk::spinbox(n)