wx.SpinCtrlDouble¶wx.SpinCtrlDouble combines wx.TextCtrl and wx.SpinButton in one control and displays a real number.
( wx.SpinCtrl displays an integer.)
Window Styles¶This class supports the following styles:
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.
Events Emitted by this Class¶Handlers bound for the following event types will receive a wx.SpinDoubleEvent parameter.
ENTER is pressed, or the control loses focus and the new value is different from the last. See wx.SpinDoubleEvent.See also
Methods Summary¶__init__ |
Default constructor. |
Create |
Creation function called by the spin control constructor. |
GetDigits |
Gets the number of digits in the display. |
GetIncrement |
Gets the increment value. |
GetMax |
Gets maximal allowable value. |
GetMin |
Gets minimal allowable value. |
GetRange |
|
GetValue |
Gets the value of the spin control. |
SetDigits |
Sets the number of digits in the display. |
SetIncrement |
Sets the increment value. |
SetMax |
|
SetMin |
|
SetRange |
Sets range of allowable values. |
SetValue |
Sets the value of the spin control. |
Properties Summary¶Digits |
See GetDigits and SetDigits |
Increment |
See GetIncrement and SetIncrement |
Max |
See GetMax and SetMax |
Min |
See GetMin and SetMin |
Range |
See GetRange |
Value |
See GetValue and SetValue |
Class API¶wx.SpinCtrlDouble(Control)¶Possible constructors:
SpinCtrlDouble()
SpinCtrlDouble(parent, id=-1, value="", pos=DefaultPosition,
size=DefaultSize, style=SP_ARROW_KEYS, min=0, max=100, initial=0, inc=1,
name=T("wxSpinCtrlDouble"))
SpinCtrlDouble combines TextCtrl and SpinButton in one control and displays a real number.
__init__(self, *args, **kw)¶__init__ (self)
Default constructor.
__init__ (self, parent, id=-1, value=””, pos=DefaultPosition, size=DefaultSize, style=SP_ARROW_KEYS, min=0, max=100, initial=0, inc=1, name=T(“wxSpinCtrlDouble”))
Constructor, creating and showing a spin control.
| Parameters: |
|
|---|
See also
Create(self, parent, id=ID_ANY, value="", pos=DefaultPosition, size=DefaultSize, style=SP_ARROW_KEYS, min=0, max=100, initial=0, inc=1, name="wxSpinCtrlDouble")¶Creation function called by the spin control constructor.
See wx.SpinCtrlDouble for details.
| Parameters: | |
|---|---|
| Return type: | bool |
GetDigits(self)¶Gets the number of digits in the display.
| Return type: | int |
|---|
GetIncrement(self)¶Gets the increment value.
| Return type: | float |
|---|
GetMax(self)¶Gets maximal allowable value.
| Return type: | float |
|---|
GetMin(self)¶Gets minimal allowable value.
| Return type: | float |
|---|
GetRange(self)¶GetValue(self)¶Gets the value of the spin control.
| Return type: | float |
|---|
SetDigits(self, digits)¶Sets the number of digits in the display.
| Parameters: | digits (int) – |
|---|
SetIncrement(self, inc)¶Sets the increment value.
| Parameters: | inc (float) – |
|---|
Note
You may also need to increase the number of visible digits using SetDigits
SetMax(self, maxVal)¶SetMin(self, minVal)¶SetRange(self, minVal, maxVal)¶Sets range of allowable values.
| Parameters: |
|
|---|
SetValue(self, *args, **kw)¶SetValue (self, text)
Sets the value of the spin control.
It is recommended to use the overload taking a float value instead.
Notice that, unlike wx.TextCtrl.SetValue , but like most of the other setter methods in wxWidgets, calling this method does not generate any events as events are only generated for the user actions.
| Parameters: | text (string) – |
|---|
SetValue (self, value)
Sets the value of the spin control.
Calling this method doesn’t generate any wxEVT_SPINCTRLDOUBLE events.
| Parameters: | value (float) – |
|---|
Increment¶See GetIncrement and SetIncrement