Package gui :: Module filedialog :: Class RelaxFileDialog
[hide private]
[frames] | no frames]

Class RelaxFileDialog

source code


relax specific replacement file dialog for opening and closing files.

This class provides the select() method so that this class can be used with a wx event.

Instance Methods [hide private]
 
__init__(self, parent, field=None, message=wx.FileSelectorPromptStr, defaultDir=wx.EmptyString, defaultFile=wx.EmptyString, wildcard=wx.FileSelectorDefaultWildcardStr, style=wx.FD_DEFAULT_STYLE, pos=wx.DefaultPosition)
Setup the class and store the field.
source code
str or list of str
get_file(self)
Return the selected file.
source code
 
select_event(self, event)
The file selector GUI element.
source code
Method Details [hide private]

__init__(self, parent, field=None, message=wx.FileSelectorPromptStr, defaultDir=wx.EmptyString, defaultFile=wx.EmptyString, wildcard=wx.FileSelectorDefaultWildcardStr, style=wx.FD_DEFAULT_STYLE, pos=wx.DefaultPosition)
(Constructor)

source code 

Setup the class and store the field.

Parameters:
  • parent (Window) - The parent wx window object.
  • field (wx object or None) - The field to update with the file selection.
  • message (String) - The file selector prompt string.
  • defaultDir (String) - The directory to open in.
  • defaultFile (String) - The file to default selection to.
  • 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.
  • pos (Point) - The window position.

get_file(self)

source code 

Return the selected file.

Returns: str or list of str
The name of the selected file(s).

select_event(self, event)

source code 

The file selector GUI element.

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