Package gui :: Package input_elements :: Module file :: Class Selector_file_multiple
[hide private]
[frames] | no frames]

Class Selector_file_multiple

source code

Wizard GUI element for selecting files.

Instance Methods [hide private]
 
__init__(self, name=None, default=None, parent=None, sizer=None, desc=None, message='File selection', wildcard=u'*', style=1, tooltip=None, divider=None, padding=0, spacer=None, height_element=27, preview=True, read_only=False, can_be_none=False)
Build the file selection element.
source code
 
Clear(self)
Special method for clearing or resetting the GUI 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
 
open_dialog(self, event)
Open a special dialog for inputting a list of text values.
source code
 
preview_file(self, event=None)
Preview a file.
source code
 
selection_win_data(self)
Extract the data from the file list selection window.
source code
 
selection_win_show(self)
Show the file list selection window.
source code
Method Details [hide private]

__init__(self, name=None, default=None, parent=None, sizer=None, desc=None, message='File selection', wildcard=u'*', style=1, tooltip=None, divider=None, padding=0, spacer=None, height_element=27, preview=True, read_only=False, can_be_none=False)
(Constructor)

source code 

Build the file selection element.

Parameters:
  • name (str) - The name of the element to use in titles, etc.
  • default (str) - The default value of the element.
  • parent (wx.Panel instance) - The wizard GUI element.
  • sizer (wx.Sizer instance) - The sizer to put the input field into.
  • desc (str) - The text description.
  • message (String) - The file selector prompt string.
  • wildcard (String) - The file wildcard pattern. For example for opening PDB files, this could be "PDB files (*.pdb)|*.pdb;*.PDB".
  • style (long) - The dialog style. To open a single file, set to wx.FD_OPEN. To open multiple files, set to wx.FD_OPEN|wx.FD_MULTIPLE. To save a single file, set to wx.FD_SAVE. To save multiple files, set to wx.FD_SAVE|wx.FD_MULTIPLE.
  • tooltip (str) - The tooltip which appears on hovering over all the GUI elements.
  • divider (int) - The position of the divider.
  • 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.
  • preview (bool) - A flag which if true will allow the file to be previewed.
  • read_only (bool) - A flag which if True means that the text of the element cannot be edited.
  • 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: list of str
The string value.

SetValue(self, value)

source code 

Special method for setting the value of the GUI element.

Parameters:
  • value (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.

preview_file(self, event=None)

source code 

Preview a file.

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