A SpinButton has two small up and down (or left and right) arrow buttons. It is often used next to a text control for increment and decrementing a value. Portable programs should try to use SpinCtrl instead as SpinButton is not implemented for all platforms but SpinCtrl is as it degenerates to a simple TextCtrl on such platforms.
NB: the range supported by this control (and SpinCtrl) depends on the
platform but is at least -0x8000 to 0x7fff. Under GTK and
Win32 with sufficiently new version of comctrl32.dll (at least 4.71 is
required, 5.80 is recommended) the full 32 bit range is supported.
SP_HORIZONTAL |
Specifies a horizontal spin button (note that this style is not supported in GTK). |
SP_VERTICAL |
Specifies a vertical spin button. |
SP_ARROW_KEYS |
The user can use arrow keys to change the value. |
SP_WRAP |
The value wraps at the minimum and maximum. |
See also window styles overview.
spinevt.inc
SpinButton.new(Window parent, Integer id,
Point pos = DEFAULT_POSITION,
Size size = DEFAULT_SIZE,
Integer style = SP_HORIZONTAL,
String name = "spinButton")
Constructor, creating and showing a spin button.
destructor()
Destructor, destroys the spin button control.
Boolean create(Window parent, Integer id,
Point pos = DEFAULT_POSITION,
Size size = DEFAULT_SIZE,
Integer style = SP_HORIZONTAL,
String name = "spinButton")
Scrollbar creation function called by the spin button constructor. See SpinButton.new for details.
Integer get_max()
Returns the maximum permissible value.
Integer get_min()
Returns the minimum permissible value.
Integer get_value()
Returns the current spin button value.
set_range(Integer min, Integer max)
Sets the range of the spin button.
SpinButton#get_min, SpinButton#get_max
set_value(Integer value)
Sets the value of the spin button.
[This page automatically generated from the Textile source at Thu May 01 00:50:44 +0100 2008]