O'Reilly logo

Tcl/Tk in a Nutshell by Jeff Tranter, Paul Raines

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Control

tixControl pathName [option value...]

The tixControl command creates a new tixControl mega-widget named pathName. The tixControl class is derived from the tixPrimitive class. The tixControl widget, also known as a spinbox, is generally used to Control a denumerable value. The user can adjust the value by pressing the two arrow buttons or by entering the value directly into the entry.

The tixControl supports two selection modes with the -selectmode option. When the mode is immediate, the current value is changed immediately when the user enters a keystroke. When the mode is normal, the current value is not changed until the user presses the Return key. If the user presses the Escape key, the string displayed in the entry is changed back to the current value.

Widget-Specific Options

-allowempty boolean (allowEmpty, AllowEmpty)

Whether an empty string is a valid input value.

-autorepeat boolean (autoRepeat, AutoRepeat)

Whether increment and decrement buttons should autorepeat when held down.

-command tclCommand (command, Command)

Command to call when the current value is changed. The value is appended as an argument.

-decrcmd tclCommand (decrCmd, DecrCmd)

Command to call when the user presses the decrement button. The current value is appended as an argument. The Return value is made the new current value.

-disablecallback boolean (disableCallback, DisableCallback)

Whether callbacks (specified by the -command option) are disabled.

-disabledforeground color (disabledForeground, DisabledForeground ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required