dialogs
Several dialog classes and helper functions for file/folder dialogs
Classes:
|
Alternative to wx.NumberEntryDialog that provides a TextCtrl which only allows numbers and decimal points to be entered. |
|
Alternative to wx.NumberEntryDialog that provides a TextCtrl which only allows numbers to be entered. |
Class to generate glob wildcards for wx.FileDialog |
Functions:
|
Create a wx.FileDialog with for the extension and filetypestring given, and return the filename selected. |
|
Create a |
|
Create a wx.FileDialog with the wildcard string given, and return a list of the files selected. |
-
class
FloatEntryDialog
(*args, **kwargs)[source] Bases:
TextEntryDialog
Alternative to wx.NumberEntryDialog that provides a TextCtrl which only allows numbers and decimal points to be entered.
Based on http://wxpython-users.1045709.n5.nabble.com/Adding-Validation-to-wx-TextEntryDialog-td2371082.html
Methods:
GetValue
()
-
class
IntEntryDialog
(*args, **kwargs)[source] Bases:
TextEntryDialog
Alternative to wx.NumberEntryDialog that provides a TextCtrl which only allows numbers to be entered.
Based on http://wxpython-users.1045709.n5.nabble.com/Adding-Validation-to-wx-TextEntryDialog-td2371082.html
Methods:
GetValue
()
-
class
Wildcards
[source] Bases:
object
Class to generate glob wildcards for wx.FileDialog
Methods:
__repr__
()Return repr(self).
__str__
()Return str(self).
add_all_files_wildcard
([hint_format])Add a wildcard for ‘All Files’.
add_common_filetype
(filetype[, hint_format, …])Add a common filetype.
add_filetype
(description[, extensions, …])Add a filetype to the wildcards
add_image_wildcard
([value_format])Add a wildcard for all image filetypes.
Attributes:
Returns a string representing the wildcards for use in wx.FileDialog or file_dialog_wildcards
-
add_common_filetype
(filetype, hint_format=8, value_format=12)[source] Add a common filetype.
- Parameters
Valid values for hint_format and value_format are style_uppercase, style_lowercase and style_hidden, which can be combined using the | operator.
-
add_filetype
(description, extensions=None, hint_format=8, value_format=12)[source] Add a filetype to the wildcards
- Parameters
Valid values for hint_format and value_format are style_uppercase, style_lowercase and style_hidden, which can be combined using the | operator.
-
-
file_dialog
(*args, **kwargs)[source] Create a wx.FileDialog with for the extension and filetypestring given, and return the filename selected.
-
file_dialog_multiple
(parent, extension, title, filetypestring, style=6, **kwargs)[source] Create a
wx.FileDialog
with the extension and filetypestring given, and return a list of the files selected.- Parameters
- Return type
- Returns
List of filenames for the selected files. If
wx.FD_MULTIPLE
is not in the style, the list will contain only one element.