Package gui :: Package input_elements :: Module spin_id :: Class Spin_id
[hide private]
[frames] | no frames]

Class Spin_id

source code

GUI element for the input of spin ID strings.

Instance Methods [hide private]
 
__init__(self, name=None, default=None, parent=None, element_type='default', sizer=None, desc="spin ID string", combo_choices=None, combo_data=None, tooltip=None, divider=None, padding=0, spacer=None, height_element=27, can_be_none=True)
Set up the base spin ID element.
source code
 
Clear(self)
Special method for clearing or resetting the GUI element.
source code
str or None
GetValue(self)
Special method for returning the value of the GUI element.
source code
 
SetValue(self, value)
Special method for setting the value of the GUI element.
source code
 
UpdateChoices(self, combo_choices=None, combo_data=None, combo_default=None)
Special wizard method for updating the list of choices in a ComboBox type element.
source code
Method Details [hide private]

__init__(self, name=None, default=None, parent=None, element_type='default', sizer=None, desc="spin ID string", combo_choices=None, combo_data=None, tooltip=None, divider=None, padding=0, spacer=None, height_element=27, can_be_none=True)
(Constructor)

source code 

Set up the base spin ID element.

Parameters:
  • name (str) - The name of the element to use in titles, etc.
  • default (str or None) - The default value.
  • parent (wx.Panel instance) - The parent GUI element.
  • element_type (str) - The type of GUI element to create. This currently only supports the 'default' type.
  • sizer (wx.Sizer instance) - The sizer to put the input field widget into.
  • desc (str) - The text description.
  • combo_choices (list of str) - The list of choices to present to the user.
  • combo_data (list) - The data returned by a call to GetValue(). If supplied, it should be the same length at the combo_choices list. If not supplied, the combo_choices list will be used for the returned data.
  • tooltip (str) - The tooltip which appears on hovering over the text or input field.
  • choices (list of str) - The list of choices to present to the user.
  • divider (None or int) - The optional position of the divider. If None, the class variable _div_left will be used.
  • padding (int) - Spacing to the left and right of the widgets.
  • spacer (None or int) - The amount of spacing to add below the field in pixels. If None, a stretchable spacer will be used.
  • height_element (int) - The height in pixels of the GUI element.
  • can_be_none (bool) - A flag which specifies if the element is allowed to have the None value.

GetValue(self)

source code 

Special method for returning the value of the GUI element.

Returns: str or None
The spin ID value.

SetValue(self, value)

source code 

Special method for setting the value of the GUI element.

Parameters:
  • value (str or None) - The spin ID to set.

UpdateChoices(self, combo_choices=None, combo_data=None, combo_default=None)

source code 

Special wizard method for updating the list of choices in a ComboBox type element.

Parameters:
  • combo_choices (list of str) - The list of choices to present to the user.
  • combo_data (list) - The data returned by a call to GetValue(). If supplied, it should be the same length at the combo_choices list. If not supplied, the combo_choices list will be used for the returned data.
  • combo_default (str or None) - The default value of the ComboBox. This is only used if the element_type is set to 'combo'.