Inheritance diagram for wx.SpinButton:
A wx.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 wx.SpinCtrl instead as wx.SpinButton is not implemented for all platforms but wx.SpinCtrl is as it degenerates to a simple wx.TextCtrl on such platforms.
Note
the range supported by this control (and wx.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.
See also
Window Style | Description |
---|---|
wx.SP_HORIZONTAL | Specifies a horizontal spin button (note that this style is not supported in wxGTK). |
wx.SP_VERTICAL | Specifies a vertical spin button. |
wx.SP_ARROW_KEYS | The user can use arrow keys to change the value. |
wx.SP_WRAP | The value wraps at the minimum and maximum. |
Event Name | Description |
---|---|
wx.EVT_SPIN(id, func) | Generated whenever an arrow is pressed. |
wx.EVT_SPIN_UP(id, func) | Generated when left/up arrow is pressed. |
wx.EVT_SPIN_DOWN(id, func) | Generated when right/down arrow is pressed. |
Note
Note that if you handle both SPIN and UP or DOWN events, you will be notified about each of them twice: first the UP / DOWN event will be received and then, if it wasn’t vetoed, the SPIN event will be sent
Constructor, creating and showing a spin button.
Parameters:
Returns:
Returns the maximum permissible value.
Returns:
int
See also
Returns the minimum permissible value.
Returns:
int
See also
Returns the current spin button value.
Returns:
int
See also
Parameters:
Parameters:
Sets the range of the spin button.
Parameters:
Sets the value of the spin button.
Parameters:
See also