Package gui :: Module wizard_elements :: Class List
[hide private]
[frames] | no frames]

Class List

source code


Base wizard GUI element for the input of all types of lists.

Instance Methods [hide private]
 
__init__(self, name=None, parent=None, element_type='default', sizer=None, desc=None, combo_choices=None, combo_data=None, combo_default=None, combo_list_size=None, tooltip=None, divider=None, padding=0, spacer=None)
Set up the element.
source code
list of str
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
 
init_window(self)
Dummy method which must be overridden.
source code
 
open_dialog(self, event)
Open a special dialog for inputting a list of text values.
source code
Method Details [hide private]

__init__(self, name=None, parent=None, element_type='default', sizer=None, desc=None, combo_choices=None, combo_data=None, combo_default=None, combo_list_size=None, tooltip=None, divider=None, padding=0, spacer=None)
(Constructor)

source code 

Set up the element.

Parameters:
  • name (str) - The name of the element to use in titles, etc.
  • parent (wx.Panel instance) - The wizard GUI element.
  • element_type (str) - The type of GUI element to create. If set to 'default', the wx.TextCtrl element with a button to bring up a dialog with ListCtrl will be used. If set to 'combo_list', the special gui.components.combo_list.Combo_list element will be used.
  • 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. This is only used if the element_type is set to 'combo'.
  • combo_data (list) - The data returned by a call to GetValue(). This is only used if the element_type is set to 'combo'. 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'.
  • combo_list_size (int or None) - The number of initial entries in a Combo_list object.
  • tooltip (str) - The tooltip which appears on hovering over the text or input field.
  • 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.

GetValue(self)

source code 

Special method for returning the value of the GUI element.

Returns: list of str
The string list value.

SetValue(self, value)

source code 

Special method for setting the value of the GUI element.

Parameters:
  • value (list of str) - The value to set.

open_dialog(self, event)

source code 

Open a special dialog for inputting a list of text values.

Parameters:
  • event (wx event) - The wx event.