I added support for Strings in the Spinbox just because I'd been
asked by so many people for it. However, you may want to consider
using the
ComboBox widget
to allow the user to select from a set of strings.
- New Resources Specific to XmNspinboxType of
XmSPINBOX_STRINGS
- XmNitemCount
-
The number of elements in the XmNitems array.
- XmNitems
-
An array of Strings that will be displayed in the spinbox. Note that,
unlike the XmList widget's XmNitems resource, this is a list of
Strings, not XmStrings.
- XmNitemsAreSorted
-
If XmNitemsAreSorted is false (default), then when new text is entered to the spinbox,
it will search all the elements in XmNitems until a match is found or all elements
have been searched. If XmNitemsAreSorted is true, a binary search using
strcmp()
for comparisons will be used instead.