A Scale cannot have a pixmap as its label. Since real estate for the label is limited in a Scale widget, you should take
care to use small strings. If you need to use a longer string, you should include a separator so that the text is printed on
two lines. If the string is too long, the label may be too wide and look awkward as a result. For a horizontal Scale, the
label is displayed beneath the slider, while for a vertical Scale it is shown to the side of the slider.
The maximum and minimum values are set with the XmNmaximum and XmNminimum resources, respectively. The
minimum values are set to 1 for the user's benefit; the minimum value of a Scale defaults to 0. Note that if you set a
minimum value other than 0, you must also provide a default value for XmNvalue that is at least as large as the value
of XmNminimum, as we have done in our example. Each Scale displays its current value because the
XmNshowValue resource is set to True.
14.2 Scale Values
The value of a Scale can only be stored as an integer. This restriction is largely based on the fact that variables of type
float and double cannot be passed through XtVaSetValues(), XtVaGetValues(), or any of the widget
creation functions. While the Xt functions mentioned do allow the passing of the address of a variable of type float
or double, the Scale widget does not support this type of value representation. If you need to represent fractional
values, you must use the XmNdecimalPoints resource. This resource specifies the number of places ...