SpinBox widget

The SpinBox widget, introduced in Motif 2.0, is a general purpose constraint manager which rotates the set of values associated with any TextField children. It provides a pair of ArrowButtons which increment and decrement the value of the TextField child which has the current input focus.

The SpinBox does not supply TextField children itself - these must be added by the programmer.

The set of values associated with the TextField is specified through constraint resources. TextField children are considered to be of two types: numerical, and string-based. For a numerical TextField, the range of possible values is specified by setting a maximum and minimum bound, together with an increment value. Each time a SpinBox arrow is pressed, the current TextField value is adjusted by the increment value. For a string-based TextField, the set of values is specified through an array of compound strings.

A SpinBox will accept various types of children, not just TextFields, so that Labels can be added to provide extra information to the user. The SpinBox simply lays out all of its children in a horizontal line.

For more details of the SpinBox widget, see XmSpinBox(3X) in the OSF/Motif Programmer's Reference.

See also: