SpinButton.SpinButton Class Reference


Detailed Description

This is an Alias-look spin button.

(Rather, pair of buttons)

Its behaviour and calls are the same as the wx SpinButton class.

Addition: There are extensions to this class to allow it to be used to manage a float-based range of values and steps. This is above and beyond the functionality in the wx version of this class.

To set a float range, use the same calls, but provide float numbers instead of ints. Set the step by calling SetStep.

ATTENTION MAINTAINER: This class's behaviour is particularly sensitive. If you intend to change it's behaviour, be sure to use the state manipulation mechanism supplied.

List of all members.

Public Member Functions

  __init__ ()
  Initialize the class.
  GetMax ()
  Return the maximum allowed value for this control.
  GetMin ()
  Return the minimum allowed value for this control.
  GetValue ()
  Return the current value of this control.
  GetIncrements ()
  Returns a tuple with three entries: the small, medium, and large step sizes.
  SetRange ()
  Set new max and min values for this control (int, int)
  SetIncrements ()
  Set the step sizes used by the spin control when auto-incrementing.
  SetValue ()
  Set new value of this control and checks the range.
  Enable ()
  Set the enabled state of this control (bool)
  Disable ()
  Same as Enable( False )
  IsMouseOver ()
  Returns true if the mouse is over the control.

Public Attributes

int  kSpinDelay = 220
tuple  kVerticalSize = (18,28)
tuple  kHorizontalSize = (28,18)

Member Function Documentation

SpinButton.SpinButton.__init__ ( )

Initialize the class.

parent: The window that is a parent of this control id: a unique id pos: a tuple (x,y) for the upper-left corner of the control size: a tuple (w,h) for the size of the control style: wx.SP_HORIZONTAL or wx.SP_VERTICAL. If not specified, the buttons will be horizontal. wx.SP_WRAP allows the value to wrap around the minimum and maximum.

SpinButton.SpinButton.GetMax ( )

Return the maximum allowed value for this control.

SpinButton.SpinButton.GetMin ( )

Return the minimum allowed value for this control.

SpinButton.SpinButton.GetValue ( )

Return the current value of this control.

SpinButton.SpinButton.GetIncrements ( )

Returns a tuple with three entries: the small, medium, and large step sizes.

SpinButton.SpinButton.SetRange ( )

Set new max and min values for this control (int, int)

SpinButton.SpinButton.SetIncrements ( )

Set the step sizes used by the spin control when auto-incrementing.

SpinButton.SpinButton.SetValue ( )

Set new value of this control and checks the range.

SpinButton.SpinButton.Enable ( )

Set the enabled state of this control (bool)

SpinButton.SpinButton.Disable ( )

Same as Enable( False )

SpinButton.SpinButton.IsMouseOver ( )

Returns true if the mouse is over the control.


Member Data Documentation


SpinButton.SpinButton SpinButton.SpinButton SpinButton.SpinButton SpinButton.SpinButton SpinButton.SpinButton SpinButton.SpinButton SpinButton.SpinButton SpinButton.SpinButton SpinButton.SpinButton SpinButton.SpinButton
SpinButton.SpinButton SpinButton.SpinButton SpinButton.SpinButton SpinButton.SpinButton SpinButton.SpinButton SpinButton.SpinButton SpinButton.SpinButton SpinButton.SpinButton SpinButton.SpinButton SpinButton.SpinButton