tixControl(n)
β¨ NAME β¨
Okay so bestie, welcome to the tixControl(n) manual page π β this is the one about tixControl, and it does exactly what it says on the tin: create and manipulate tixControl widgets. Periodt. π This page lives in the Tix Built-In Commands manual, iykyk.
πΈ SYNOPSIS πΈ
tixControl pathName ?options?
π¦ SUPER-CLASS π¦
The TixControl class is derived from the TixLabelWidget class, and it inherits all the commands, options, and subwidgets of its super-class. No cap, it gets the whole inheritance package. π
π STANDARD OPTIONS π
The Control widget supports all the standard options of a frame widget. For the deets on those standard options, see the options(n) manual entry. Iykyk β¨
π WIDGET-SPECIFIC OPTIONS π
Okay now the main character energy: these are the options that are specific to this widget. Keep every single one, bestie.
-allowempty(allowEmpty) β says whether the Control widget should allow the empty string as a valid input. π«Ά-autorepeat(autorepeat) β says whether the Control widget should have autorepeat behavior. If it's set to"true", the value of the Control widget gets automatically incremented or decremented when the user holds down the mouse button over the arrow buttons. Only the values"true"and"false"are recognized. π-command(command) β the command to be called when the-valueoption of the Control widget is changed. The command is called with one argument β the new value of the Control widget. Lowkey important. π―-decrcmd(decrCmd) β a TCL command to be called when the user presses the down-arrow button subwidget. This command is called with one parameter β the current-valueof this Control widget. Its job is to decrement this value by one step, according to its own definition of "decrement", and return the decremented value, which will be stored in the-valueof this Control widget. π-disablecallback(disableCallback) β a boolean value indicating whether callbacks should be disabled. When set to true, the TCL command specified by the-commandoption is not executed when the-valueof the Control widget changes. π«-disableforeground(disableForeground) β the foreground color to use for the entry subwidget when the Control widget is disabled. So it still looks cute but clearly unavailable. π-incrcmd(incrCmd) β a TCL command to be called when the user presses the up-arrow button subwidget. This command is called with one parameter β the current-valueof this Control widget. Its job is to increment this value by one step, according to its own definition of "increment", and return the incremented value, which will be stored in the-valueof this Control widget. π-initwait(initwait) β how long the Control widget should wait initially before it starts to automatically increment or decrement its value in autorepeat mode. In milliseconds. β³-integer(integer) β a Boolean value specifying whether only integer numbers are accepted. π’-label(label) β the string to display as the label of this Control widget. π·οΈ-labelside(labelSide) β where the label should be displayed relative to the entry subwidget. Valid options are:top,left,right,bottom,noneoracrosstop. Main character label placement, fr fr. β¨maxβ Name:max; Class:Max; Switch:-max; Alias:-ulimit. Specifies the upper limit of the value of the Control widget. When set to the empty string, the Control widget has no upper limit. ποΈminβ Name:min; Class:Min; Switch:-min; Alias:-llimit. Specifies the lower limit of the value of the Control widget. When set to the empty string, the Control widget has no lower limit. π-repeatrate(repeatRate) β how often the value of the Control widget should be incremented or decremented when it is in autorepeat mode. In milliseconds. π-selectmode(selectMode) β how the Control widget should react to<KeyPress>events. When set to"immediate", any user keyboard inputs will immediately change the-valueoption. When set to"normal", the user keyboard inputs will be copied to the-valueoption only if the<Return>key is pressed or the keyboard focus is changed. The use of immediate mode is discouraged. For effective use of the Control widget, one should use normal mode together with theupdatewidget command (see below). πΉ-state(state) β says whether the Control widget isnormalordisabled. Only the values"normal"and"disabled"are recognized. π-step(step) β specifies by how much the value of the Control widget should be incremented or decremented when the user presses the arrow buttons. πͺ-validatecmd(validateCmd) β a TCL command to be called when the-valueof the Control widget is about to change. This command is called with one parameter β the new-valueentered by the user. Its job is to validate this new value by returning a value it deems valid. β-value(value) β specifies the value of the Control widget. The whole point, honestly. π-variable(variable) β specifies the global variable in which the value of the Control widget should be stored. The value of the Control widget will be automatically updated when this variable is changed. π
Warning vibe: the-selectmodeimmediate mode is discouraged. The manual says to use normal mode together with theupdatewidget command for effective use. π
π«Ά SUBWIDGETS π«Ά
These are the little subwidgets living inside, each with its own name and class:
decrβ Class:Button. The down arrow button. β¬οΈentryβ Class:Entry. The entry that shows the value of this Control widget. πincrβ Class:Button. The up arrow button. β¬οΈlabelβ Class:Label. The label subwidget. π·οΈ
π DESCRIPTION π
The tixControl command creates a new window (given by the pathName argument) and makes it into a Control widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the Control widget such as its cursor and relief. β¨
The Control widget is also known as the SpinBox widget. It is generally used to control a value. The user can adjust the value by pressing the two arrow buttons or by entering the value directly into the entry. The new value will be checked against the user-defined upper and lower limits. That's the whole vibe check, and honestly it slays. π
π WIDGET COMMANDS π
The tixControl command creates a new Tcl command whose name is the same as the path name of the Control widget's window. This command may be used to invoke various operations on the widget. It has the following general form:
pathName option ?arg arg ...?
PathName is the name of the command, which is the same as the Control widget's path name. Option and the args determine the exact behavior of the command. The following commands are possible for Control widgets:
pathName cget optionβ returns the current value of the configuration option given byoption.Optionmay have any of the values accepted by thetixControlcommand. πpathName configure ?option? ?value option value ...?β query or modify the configuration options of the widget. If nooptionis specified, returns a list describing all of the available options forpathName(seeTk_ConfigureInfofor information on the format of this list). Ifoptionis specified with novalue, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if nooptionis specified). If one or moreoption-valuepairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string.Optionmay have any of the values accepted by thetixControlcommand. π οΈpathName decrβ decrements the value of the Control widget by the step specified by the-stepoption. β¬οΈpathName incrβ increments the value of the Control widget by the step specified by the-stepoption. β¬οΈpathName invokeβ causes the command specified by the-commandoption to be invoked. π£pathName updateβ if the user has modified the entry using keyboard inputs, theupdatecommand will update the-valueof this Control widget. When the Control widget's-selectmodeoption is set to"normal", one should call theupdatecommand on this widget before examining its-valueoption. This command has no effect if the-selectmodeoption is set to"immediate". πpathName subwidget name ?args?β when no options are given, this command returns the pathname of the subwidget of the specified name. When options are given, the widget command of the specified subwidget will be called with these options. π§©
π₯ BINDINGS π₯
When the user presses the up/down arrow buttons (or presses the <Up> and <Down> arrow keys on the keyboard), the value of the tixControl widget is adjusted according to the -validatecmd, -incrcmd, -decrcmd, -step, -max and -min options. That's the bindings buffet, bestie. π
β KEYWORDS β
This page is from Tix 4.0, and the manual page is tixControl(n) β catch you in the group chat, mwah ππ¦β¨
π¦ where this page comes from
- opensuse-leap 16.0: tix 8.4.3-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: tix 8.4.3-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: tix 8.4.3-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: tix 8.4.3-160000.2.2 Β· BSD-3-Clause
- Copyright (c) 1993-1999 Ioi Kim Lam
- Copyright (c) 2000-2001 Tix Project Group
- (c) 1990 The Regents of the University of California
- (c) 1994-1995 Sun Microsystems, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms