A spinner is a control made of two buttons with up/down arrows to store,
increment and decrement
a value. A spinner normally work in conjunction with an EditBox (the "buddy").
If the spinner control is created immediately after the edit box, they will
operate together automatically if you include the WBC_GROUP
style. In this case the value stored in the spinner will always be
shown in the edit box. The edit box can also be used for entering numbers
manually. To create a spinner, use the function wb_create_control()
passing Spinner as the parameter cclass.
The default range when a spinner is created is 0 to 100. To change the spinner range, use the wb_set_value() function.
In the windows handler, you should always process the edit box which is attached to the spinner, not the spinner itself. If you try to process the spinner control you will receive the messages twice. Similarly, you should always get or set the value of the edit box instead of trying to get/set the value of the spinner directly. If you do the latter, you may miss any changes made manually on the edit box.
|
|
wb_create_control
wb_set_value
Control
classes