enaml.widgets.file_dialog_ex
Classes
A toolkit dialog for getting file and directory names. |
- class enaml.widgets.file_dialog_ex.FileDialogEx(parent=None, **kwargs)[source]
Bases:
ToolkitDialog
A toolkit dialog for getting file and directory names.
This dialog supercedes the FileDialog class. New code you should use this dialog in lieu of the older version.
- accept_mode
The accept mode of the dialog.
- file_mode
The file mode of the dialog.
- show_dirs_only
Whether or not to only show directories. This is only valid when the file_mode is set to ‘directory’.
- current_path
The currently selected path in the dialog.
- selected_paths
The paths selected by the user when the dialog is accepted. This value is output only.
- name_filters
The name filters used to restrict the available files.
- selected_name_filter
The selected name filter from the list of name filters.
- proxy
A reference to the ProxyFileDialog object.
- static get_existing_directory(parent=None, **kwargs)[source]
Get an existing directory on the filesystem.
- Parameters:
parent (ToolkitObject or None) – The parent toolkit object for this dialog.
**kwargs – Additional data to pass to the dialog constructor.
- Returns:
result – The user selected directory path. This will be an empty string if no directory was selected.
- Return type:
unicode
- static get_open_file_name(parent=None, **kwargs)[source]
Get the file name for an open file dialog.
- Parameters:
parent (ToolkitObject or None) – The parent toolkit object for this dialog.
**kwargs – Additional data to pass to the dialog constructor.
- Returns:
result – The user selected file name. This will be an empty string if no file name was selected.
- Return type:
unicode
- static get_open_file_names(parent=None, **kwargs)[source]
Get the file names for an open files dialog.
- Parameters:
parent (ToolkitObject or None) – The parent toolkit object for this dialog.
**kwargs – Additional data to pass to the dialog constructor.
- Returns:
result – The user selected file names. This will be an empty list if no file names were selected.
- Return type:
- static get_save_file_name(parent=None, **kwargs)[source]
Get the file name for a save file dialog.
- Parameters:
parent (ToolkitObject or None) – The parent toolkit object for this dialog.
**kwargs – Additional data to pass to the dialog constructor.
- Returns:
result – The user selected file name. This will be an empty string if no file name was selected.
- Return type:
unicode