SpinCtrl combines TextCtrl and
SpinButton in one control.
SP_ARROW_KEYS |
The user can use arrow keys to change the value. |
SP_WRAP |
The value wraps at the minimum and maximum. |
To process input from a spin button, use one of these event handler macros to direct input to member
functions that take a SpinEvent argument:
evt_spinctrl(id) { | event | … } | Generated whenever the numeric valueof the spinctrl is updated |
You may also use the SpinButton event macros, however
the corresponding events will not be generated under all platforms. Finally, if
the user modifies the text in the edit part of the spin control directly, the
EVT_TEXT
is generated, like for the TextCtrl.
When the use enters text into the text area, the text is not
validated until the control loses focus (e.g. by using the TAB
key). The value is then adjusted to the range and a
SpinEvent sent then if the value
is different from the last value sent.
Event handling overview,
SpinButton,
Control
Constructor, creating and showing a spin control.
Creation function called by the spin control constructor.
See SpinCtrl.new for details.
Sets the value of the spin control.
Gets the value of the spin control.
Sets range of allowable values.
Select the text in the text part of the control between positions
from (inclusive) and to (exclusive). This is similar to
TextCtrl#set_selection.
NB: this is currently only implemented for Windows and generic versions
of the control.
Gets minimal allowable value.
Gets maximal allowable value.
[This page automatically generated from the Textile source at 2023-06-03 08:07:36 +0000]