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.
This class supports the following styles:
Handlers bound for the following event types will receive a SpinEvent parameter.
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.
Note
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.
See also
__init__ | Default constructor. |
Create | Scrollbar creation function called by the spin button constructor. |
GetMax | Returns the maximum permissible value. |
GetMin | Returns the minimum permissible value. |
GetRange | |
GetValue | Returns the current spin button value. |
SetMax | |
SetMin | |
SetRange | Sets the range of the spin button. |
SetValue | Sets the value of the spin button. |
Max | See GetMax and SetMax |
Min | See GetMin and SetMin |
Range | See GetRange |
Value | See GetValue and SetValue |
A SpinButton has two small up and down (or left and right) arrow buttons.
Possible constructors:
SpinButton()
SpinButton(parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize,
style=SP_VERTICAL, name="spinButton")
Overloaded Implementations:
__init__ (self)
Default constructor.
__init__ (self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=SP_VERTICAL, name=”spinButton”)
Constructor, creating and showing a spin button.
Parameters: |
|
---|
See also
Scrollbar creation function called by the spin button constructor.
See SpinButton for details.
Parameters: | |
---|---|
Return type: | bool |
Sets the range of the spin button.
Parameters: |
|
---|
Sets the value of the spin button.
Parameters: | value (int) – The value for the spin button. |
---|