Spin buttons

Spin buttons allow the user to make a selection from a list of items or from an algorithmically calculated set of options. Spin buttons can contain one or more fields and therefore are ideal for such things as date and time entry. They are also editable just in case the user wants to enter some non standard value. Clicking on the spin arrow when the last item is selected will cause the first item to be displayed. Similarly, when on the first item, spinning up will wrap around to the last item.


An MSpinFieldState defines the choices available in a given field of a spin button. This class does not specify how to calculate or store the choices. The spin field state can also control whether or not that field is editable.

TStandardSpinFieldState lets you construct a spin button without having to write any derived classes. It that contains a finite set of choices in a list. Obviously this is not an efficient solution for fields that have many options that are easily generated algorithmically.

A TSpinListIterator is also provided so that you can iterate through the choices.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker