Package gui :: Package analyses :: Module elements :: Class Spin_ctrl
[hide private]
[frames] | no frames]

Class Spin_ctrl

source code

The analysis specific spin control.

Instance Methods [hide private]
 
__init__(self, box, parent, text='', default=0, min=0, max=1000, tooltip=None, control=<class 'wx._controls.SpinCtrl'>, width_text=200, width_button=80, spacer=0)
Create a text selection element using a spinner for the frame.
source code
 
Enable(self, enable=True)
Enable or disable the window for user input.
source code
int
GetValue(self)
Set the value of the control.
source code
 
SetValue(self, value)
Set the value of the control.
source code
Method Details [hide private]

__init__(self, box, parent, text='', default=0, min=0, max=1000, tooltip=None, control=<class 'wx._controls.SpinCtrl'>, width_text=200, width_button=80, spacer=0)
(Constructor)

source code 

Create a text selection element using a spinner for the frame.

This consists of a horizontal layout with a static text element and a spin control

Parameters:
  • box (wx.BoxSizer instance) - The box element to pack the structure file selection GUI element into.
  • parent (wx object) - The parent GUI element.
  • text (str) - The static text.
  • default (int) - The default value of the control.
  • min (int) - The minimum value allowed.
  • max (int) - The maximum value allowed.
  • tooltip (str) - The tooltip which appears on hovering over the text or spin control.
  • control (wx.SpinCtrl derived class) - The control class to use.
  • width_text (int) - The width of the text element.
  • width_button (int) - The width of the button.
  • spacer (int) - The horizontal spacing between the elements.

Enable(self, enable=True)

source code 

Enable or disable the window for user input.

Parameters:
  • enable (bool) - The flag specifying if the control should be enabled or disabled.

GetValue(self)

source code 

Set the value of the control.

Returns: int
The value of the spin control.

SetValue(self, value)

source code 

Set the value of the control.

Parameters:
  • value (int) - The value to set the spin control to.