Table Of Contents

Previous topic

SpinCtrl

Next topic

SpinDoubleEvent

This Page

phoenix_title SpinCtrlDouble

SpinCtrlDouble combines TextCtrl and SpinButton in one control and displays a real number.

( SpinCtrl displays an integer.)

styles Window Styles

This class supports the following styles:

  • SP_ARROW_KEYS: The user can use arrow keys to change the value.
  • SP_WRAP: The value wraps at the minimum and maximum.

events Events Emitted by this Class

Handlers bound for the following event types will receive a SpinDoubleEvent parameter.

  • EVT_SPINCTRLDOUBLE: Generated whenever the numeric value of the spin control is changed, that is, when the up/down spin button is clicked, when ENTER is pressed, or the control loses focus and the new value is different from the last. See SpinDoubleEvent.

class_hierarchy Inheritance Diagram

Inheritance diagram for class SpinCtrlDouble

Inheritance diagram of SpinCtrlDouble


appearance Control Appearance


wxMSW

wxMSW

wxMAC

wxMAC

wxGTK

wxGTK


method_summary 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.

api Class API



class SpinCtrlDouble(Control)

SpinCtrlDouble combines TextCtrl and SpinButton in one control and displays a real number.

Possible constructors:

SpinCtrlDouble()

SpinCtrlDouble(parent, id=ID_ANY, value='',
               pos=DefaultPosition, size=DefaultSize, style=SP_ARROW_KEYS, min=0,
               max=100, initial=0, inc=1, name=T("wxSpinCtrlDouble"))

Methods



__init__(self, *args, **kw)

overload Overloaded Implementations:



__init__ (self)

Default constructor.



__init__ (self, parent, id=ID_ANY, 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:
  • parent (Window) – Parent window. Must not be None.
  • id (int) – Window identifier. The value ID_ANY indicates a default value.
  • value (string) – Default value (as text).
  • pos (Point) – Window position. If DefaultPosition is specified then a default position is chosen.
  • size (Size) – Window size. If DefaultSize is specified then a default size is chosen.
  • style (long) – Window style. See SpinButton.
  • min (float) – Minimal value.
  • max (float) – Maximal value.
  • initial (float) – Initial value.
  • inc (float) – Increment value.
  • name (string) – Window name.

See also

Create





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 SpinCtrlDouble for details.

Parameters:
  • parent (Window) –
  • id (int) –
  • value (string) –
  • pos (Point) –
  • size (Size) –
  • style (long) –
  • min (float) –
  • max (float) –
  • initial (float) –
  • inc (float) –
  • name (string) –
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) –


SetMax(self, maxVal)


SetMin(self, minVal)


SetRange(self, minVal, maxVal)

Sets range of allowable values.

Parameters:
  • minVal (float) –
  • maxVal (float) –


SetValue(self, *args, **kw)

overload Overloaded Implementations:



SetValue (self, text)

Sets the value of the spin control.

Use the variant using float instead.

Parameters:text (string) –



SetValue (self, value)

Sets the value of the spin control.

Parameters:value (float) –




Properties



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