Inheritance diagram for wx.SpinCtrl:
wx.SpinCtrl combines wx.TextCtrl and wx.SpinButton in one control.
See also
Window Style | Description |
---|---|
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_SPINCTRL(id, func) | Generated whenever the numeric value of the spinctrl is updated |
Note
You may also use the wx.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 wx.EVT_TEXT is generated, like for the wx.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 wx.SpinEvent sent then if the value is different from the last value sent
Constructor, creating and showing a spin control.
Parameters:
Returns:
Gets maximal allowable value.
Returns:
int
Gets minimal allowable value.
Returns:
int
Gets the value of the spin control.
Returns:
int
Sets range of allowable values.
Parameters:
Select the text in the text part of the control between positions from (inclusive) and to (exclusive).
This is similar to wx.TextCtrl.SetSelection.
Parameters:
Note
this is currently only implemented for Windows and generic versions of the control.
Sets the value of the spin control.
Parameters:
Sets the value text of the spin control.
Parameters: