Package wx :: Package lib :: Package agw :: Module floatspin :: Class FloatSpin
[frames | no frames]

Type FloatSpin

object --+                    
         |                    
    Object --+                
             |                
    EvtHandler --+            
                 |            
            Window --+        
                     |        
               Control --+    
                         |    
                 PyControl --+
                             |
                            FloatSpin


Method Summary
  __init__(self, parent, id, pos, size, style, value, min_val, max_val, increment, digits, extrastyle, name)
Default class constructor.
  ClampValue(self, var)
Clamps var between _min and _max depending on if the range has been specified.
  DoGetBestSize(self)
Calculates the best size for FloatSpin.
  DoSendEvent(self)
Send the event to the parent.
  GetDefaultValue(self)
Returns the FloatSpin default value.
  GetDigits(self)
Returns the number of digits shown.
  GetFont(self)
Returns the underline wx.TextCtrl font.
  GetFormat(self)
Returns the string format in use.
  GetIncrement(self)
Returns the increment for every EVT_FLOATSPIN event.
  GetMax(self)
Returns the maximum value for FloatSpin.
  GetMin(self)
Returns the minimum value for FloatSpin.
  GetSnapToTicks(self)
Returns whether the snap to ticks option is active or not.
  GetTextCtrl(self)
Returns the underline wx.TextCtrl.
  GetValue(self)
Returns the FloatSpin value.
  HasRange(self)
Returns whether FloatSpin has a range or not.
  InRange(self, value)
Returns whether a value is inside FloatSpin range.
  IsDefaultValue(self)
Returns whether the current value is the default value or not.
  IsFinite(self, value)
Tries to determine if a value is finite or infinite/nan.
  OnChar(self, event)
Handles the wx.EVT_CHAR for the underline wx.TextCtrl.
  OnDestroy(self, event)
Tries to correctly handle the control destruction under MSW.
  OnFocus(self, event)
Handles the wx.EVT_SET_FOCUS event for FloatSpin.
  OnKillFocus(self, event)
Handles the wx.EVT_KILL_FOCUS event for FloatSpin.
  OnMouseWheel(self, event)
Handles the wx.EVT_MOUSEWHEEL for FloatSpin.
  OnSpinDown(self, event)
Handles the wx.EVT_SPIN_DOWN for FloatSpin.
  OnSpinMouseDown(self, event)
Handles the wx.EVT_LEFT_DOWN event for the underline wx.SpinButton.
  OnSpinUp(self, event)
Handles the wx.EVT_SPIN_UP for FloatSpin.
  OnTextEnter(self, event)
Handles the wx.EVT_TEXT_ENTER for the underline wx.TextCtrl.
  ReplaceDoubleZero(self, strs)
Replaces the (somewhat) python ugly '+e000' with +e00.
  SetDefaultValue(self, defaultvalue)
Sets the FloatSpin default value.
  SetDigits(self, digits)
Sets the number of digits to show.
  SetFont(self, font)
Set the underline wx.TextCtrl font.
  SetFormat(self, fmt)
Set the string format to use.
  SetIncrement(self, increment)
Sets the increment for every EVT_FLOATSPIN event.
  SetRange(self, min_val, max_val)
Set the allowed range.
  SetRangeDontClampValue(self, min_val, max_val)
Set the allowed range.
  SetSnapToTicks(self, forceticks)
Force the value to always be divisible by the increment.
  SetToDefaultValue(self)
Sets FloatSpin value to its default value.
  SetValue(self, value)
Sets the FloatSpin value.
  SyncSpinToText(self, send_event, force_valid)
Synchronize the underline wx.TextCtrl with wx.SpinButton.

Property Summary

Instance Method Details

__init__(self, parent, id=-1, pos=wx.Point(-1, -1), size=(95, -1), style=0, value=0.0, min_val=None, max_val=None, increment=1.0, digits=-1, extrastyle=2, name='FloatSpin')
(Constructor)

Default class constructor. Non-default parameters are:

  • value: is the current value for FloatSpin;
  • min_val: the minimum value, ignored if None
  • max_val: the maximum value, ignored if None
  • increment: the increment for every evt_floatspin events;
  • digits: number of representative digits for your floating point numbers;
  • extrastyle: one of the following: a) FS_LEFT: align underline wx.TextCtrl left; b) FS_RIGHT: align underline wx.TextCtrl right; c) FS_CENTRE: align underline wx.TextCtrl center; plus the possibility to use FS_READONLY, that makes the underline wx.TextCtrl read-only (no edits possible).
Overrides:
wx.PyControl.__init__

ClampValue(self, var)

Clamps var between _min and _max depending on if the range has been specified.

Returns a clamped copy of var.

DoGetBestSize(self)

Calculates the best size for FloatSpin.

Overrides:
wx.PyControl.DoGetBestSize

DoSendEvent(self)

Send the event to the parent.

GetDefaultValue(self)

Returns the FloatSpin default value.

GetDigits(self)

Returns the number of digits shown.

GetFont(self)

Returns the underline wx.TextCtrl font.

Overrides:
wx.Window.GetFont

GetFormat(self)

Returns the string format in use.

GetIncrement(self)

Returns the increment for every EVT_FLOATSPIN event.

GetMax(self)

Returns the maximum value for FloatSpin. It cabe be a number or None if no maximum is present.

GetMin(self)

Returns the minimum value for FloatSpin. It can be a number or None if no minimum is present.

GetSnapToTicks(self)

Returns whether the snap to ticks option is active or not.

GetTextCtrl(self)

Returns the underline wx.TextCtrl.

GetValue(self)

Returns the FloatSpin value.

HasRange(self)

Returns whether FloatSpin has a range or not.

InRange(self, value)

Returns whether a value is inside FloatSpin range.

IsDefaultValue(self)

Returns whether the current value is the default value or not.

IsFinite(self, value)

Tries to determine if a value is finite or infinite/nan.

OnChar(self, event)

Handles the wx.EVT_CHAR for the underline wx.TextCtrl.

OnDestroy(self, event)

Tries to correctly handle the control destruction under MSW.

OnFocus(self, event)

Handles the wx.EVT_SET_FOCUS event for FloatSpin.

OnKillFocus(self, event)

Handles the wx.EVT_KILL_FOCUS event for FloatSpin.

OnMouseWheel(self, event)

Handles the wx.EVT_MOUSEWHEEL for FloatSpin.

OnSpinDown(self, event)

Handles the wx.EVT_SPIN_DOWN for FloatSpin.

OnSpinMouseDown(self, event)

Handles the wx.EVT_LEFT_DOWN event for the underline wx.SpinButton.

OnSpinUp(self, event)

Handles the wx.EVT_SPIN_UP for FloatSpin.

OnTextEnter(self, event)

Handles the wx.EVT_TEXT_ENTER for the underline wx.TextCtrl.

ReplaceDoubleZero(self, strs)

Replaces the (somewhat) python ugly '+e000' with +e00.

SetDefaultValue(self, defaultvalue)

Sets the FloatSpin default value.

SetDigits(self, digits=-1)

Sets the number of digits to show. If digits < 0, FloatSpin tries to calculate the best number of digits based on input __init__ values.

SetFont(self, font=None)

Set the underline wx.TextCtrl font.

Overrides:
wx.Window.SetFont

SetFormat(self, fmt='%f')

Set the string format to use.

SetIncrement(self, increment)

Sets the increment for every EVT_FLOATSPIN event.

SetRange(self, min_val, max_val)

Set the allowed range. If max_val or min_val are None, then they are ignored.

SetRangeDontClampValue(self, min_val, max_val)

Set the allowed range. If max_val or min_val are None, then they are ignored. Doesn't modify the current value.

SetSnapToTicks(self, forceticks=True)

Force the value to always be divisible by the increment. Initially false. This uses the default value as the basis, you will get strange results for very large differences between the current value and default value when the increment is very small.

SetToDefaultValue(self)

Sets FloatSpin value to its default value.

SetValue(self, value)

Sets the FloatSpin value.

SyncSpinToText(self, send_event=True, force_valid=True)

Synchronize the underline wx.TextCtrl with wx.SpinButton.


Generated by Epydoc 2.1.20050511.rpd on Mon Feb 16 12:53:47 2009 http://epydoc.sf.net