1tixControl(n) Tix Built-In Commands tixControl(n)
2
3
4
6 tixControl - Create and manipulate tixControl widgets
7
9 tixControl pathName ?options?
10
12 The TixControl class is derived from the TixLabelWidget class and
13 inherits all the commands, options and subwidgets of its super-class.
14
16 The Control widget supports all the standard options of a frame widget.
17 See the options(n) manual entry for details on the standard options.
18
20 [-allowempty allowEmpty] Specifies whether the Control widget should
21 allow the empty string as a valid input. [-autorepeat autorepeat]
22 Specifies whether the Control widget should have autorepeat behavior.
23 If set to be "true", the value of the Control widget will be automati‐
24 cally incremented or decremented when the user holds down the mouse
25 button over the arrow buttons. Only values "true" and "false" will be
26 recognized. [-command command] Specifies the command to be called when
27 the -value option of the Control widget is changed. The command will
28 be called with one arguments -- the new value of the Control widget.
29 [-decrcmd decrCmd] Specifies a TCL command to be called when the the
30 user presses the down-arrow button subwidget. This command is called
31 with one parameter -- the current -value of this Control widget. This
32 command is to decrement this value by one step, according to its own
33 definition of "decrement", and return the decremented value, which will
34 be stored in the -value of this Control widget. [-disablecallback dis‐
35 ableCallback] A boolean value indicating whether callbacks should be
36 disabled. When set to true, the TCL command specified by the -command
37 option is not executed when the -value of the Control widget changes.
38 [-disableforeground disableForeground] The foreground color to use for
39 of the entry subwidget when the Control widget is disabled. [-incr‐
40 cmd incrCmd] Specifies a TCL command to be called when the the user
41 presses the up-arrow button subwidget. This command is called with one
42 parameter -- the current -value of this Control widget. This command is
43 to increment this value by one step, according to its own definition of
44 "increment", and return the incremented value, which will be stored in
45 the -value of this Control widget. [-initwait initwait] Specifies how
46 long the Control widget should wait initially before it starts to auto‐
47 matically increment or decrement its value in the autorepeat mode. In
48 milliseconds. [-integer integer] A Boolean value specifying whether
49 only integer numbers are accepted. [-label label] Specifies the string
50 to display as the label of this Control widget. [-labelside labelSide]
51 Specifies where the label should be displayed relative to the entry
52 subwidget. Valid options are: top, left, right, bottom, none or
53 acrosstop.
54
55 Name: max
56 Class: Max
57 Switch: -max
58 Alias: -ulimit
59
60 Specifies the upper limit of the value of the Control widget.
61 When set to empty string, the Control widget has no upper limit.
62
63 Name: min
64 Class: Min
65 Switch: -min
66 Alias: -llimit
67
68 Specifies the lower limit of the value of the Control wid‐
69 get.When set to empty string, the Control widget has no lower
70 limit. [-repeatrate repeatRate] Specifies how often the value
71 of the Control widget should be incremented or decremented when
72 it is in the autorepeat mode. In milliseconds. [-select‐
73 mode selectMode] Specifies how the Control widget should react
74 to <KeyPress> events. When set to "immediate", any user keyboard
75 inputs will immediately change the -value option. When set to
76 "normal", the user keyboard inputs will be copied to the -value
77 option only if the <Return> key is pressed or the keyboard focus
78 is changed. The use of the immediate mode is discouraged. For
79 effective use of the Control widget, one should use the normal
80 mode together with the update widget command (see below).
81 [-state state] Specifies the whether the Control widget is nor‐
82 mal or disabled. Only the values "normal" and "disabled" are
83 recognized. [-step step] Specifies by how much the value of the
84 Control widget should be incremented or decrmented when the user
85 press the arrow buttons. [-validatecmd validateCmd] Specifies a
86 TCL command to be called when the -value of the Control widget
87 is about to change. This command is called with one parameter --
88 the new -value entered by the user. This command is to validate
89 this new value by returning a value it deems valid.
90 [-value value] Specifies the value of the Control widget.
91 [-variable variable] Specifies the global variable in which the
92 value of the Control widget should be stored. The value of the
93 Control widget will be automatically updated when this variable
94 is changed.
95
97 Name: decr
98 Class: Button
99
100 The down arrow button.
101
102 Name: entry
103 Class: Entry
104
105 The entry that shows the value of this Control widget.
106
107 Name: incr
108 Class: Button
109
110 The up arrow button.
111
112 Name: label
113 Class: Label
114
115 The label subwidget.
116
118 The tixControl command creates a new window (given by the pathName
119 argument) and makes it into a Control widget. Additional options,
120 described above, may be specified on the command line or in the option
121 database to configure aspects of the Control widget such as its cursor
122 and relief.
123
124 The Control widget is also known as the SpinBox widget. It is gener‐
125 ally used to control a value. The user can adjust the value by pressing
126 the two arrow buttons or by entering the value directly into the entry.
127 The new value will be checked against the user-defined upper and lower
128 limits.
129
131 The tixControl command creates a new Tcl command whose name is the same
132 as the path name of the Control widget's window. This command may be
133 used to invoke various operations on the widget. It has the following
134 general form:
135 pathName option ?arg arg ...?
136 PathName is the name of the command, which is the same as the Control
137 widget's path name. Option and the args determine the exact behavior
138 of the command. The following commands are possible for Control wid‐
139 gets:
140
141 pathName cget option
142 Returns the current value of the configuration option given by
143 option. Option may have any of the values accepted by the tix‐
144 Control command.
145
146 pathName configure ?option? ?value option value ...?
147 Query or modify the configuration options of the widget. If no
148 option is specified, returns a list describing all of the avail‐
149 able options for pathName (see Tk_ConfigureInfo for information
150 on the format of this list). If option is specified with no
151 value, then the command returns a list describing the one named
152 option (this list will be identical to the corresponding sublist
153 of the value returned if no option is specified). If one or
154 more option-value pairs are specified, then the command modifies
155 the given widget option(s) to have the given value(s); in this
156 case the command returns an empty string. Option may have any
157 of the values accepted by the tixControl command.
158
159 pathName decr
160 Decrements the value of the Control widget by the step specified
161 by the -step option.
162
163 pathName incr
164 Increments the value of the Control widget by the step specified
165 by the -step option.
166
167 pathName invoke
168 Causes the command specified by the -command option to be
169 invoked.
170
171 pathName update
172 If the user has modified the entry using keyboard inputs, the
173 update command will update the -value of this Control widget.
174 When the Control widget's -selectmode option is set to "normal",
175 one should call the update command on this widget before examin‐
176 ing its -value option. This command has no effect in if the
177 -selectmode option is set to "immediate".
178
179 pathName subwidget name ?args?
180 When no options are given, this command returns the pathname of
181 the subwidget of the specified name.
182
183 When options are given, the widget command of the specified sub‐
184 widget will be called with these options.
185
187 When the user presses the up/down arrow buttons (or press the <Up> and
188 <Down> arrow keys on the keyboard), the value of the tixControl widget
189 is adjusted according to the -validatecmd, -incrcmd, -decrcmd, -step,
190 -max and -min options.
191
193 Tix(n)
194
195
196
197
198
199Tix 4.0 tixControl(n)