Home | Trees | Index | Help |
|
---|
Package wx :: Class FileDialog |
|
object
--+ |Object
--+ |EvtHandler
--+ |Window
--+ |TopLevelWindow
--+ |Dialog
--+ | FileDialog
wx.FileDialog allows the user to select one or more files from the filesystem.
In Windows, this is the common file selector dialog. On X based platforms a generic alternative is used. The path and filename are distinct elements of a full file pathname. If path is "", the current directory will be used. If filename is "", no default filename will be supplied. The wildcard determines what files are displayed in the file selector, and file extension supplies a type extension for the required filename.
Both the X and Windows versions implement a wildcard filter. Typing a filename containing wildcards (*, ?) in the filename text item, and clicking on Ok, will result in only those files matching the pattern being displayed. The wildcard may be a specification for multiple types of file with a description for each, such as:
"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"
wx.FD_OPEN This is an open dialog. wx.FD_SAVE This is a save dialog. wx.FD_OVERWRITE_PROMPT For save dialog only: prompt for a confirmation if a file will be overwritten. wx.FD_MULTIPLE For open dialog only: allows selecting multiple files. wx.FD_CHANGE_DIR Change the current working directory to the directory where the file(s) chosen by the user are.
Method Summary | |
---|---|
FileDialog |
Constructor. |
String |
Returns the default directory. |
String |
Returns the default filename. |
PyObject |
Returns a list of filenames chosen in the dialog. |
int |
Returns the index into the list of filters supplied, optionally, in the wildcard parameter. |
String |
Returns the message that will be displayed on the dialog. |
String |
Returns the full path (directory and filename) of the selected file. |
PyObject |
Fills the array paths with the full paths of the files chosen. |
String |
Returns the file dialog wildcard. |
Sets the default directory. | |
Sets the default filename. | |
Sets the default filter index, starting from zero. | |
Sets the message that will be displayed on the dialog. | |
Sets the path (the combined directory and filename that will be returned when the dialog is dismissed). | |
Sets the wildcard, which can contain multiple file types, for example: |
Property Summary | |
---|---|
Directory : See GetDirectory and SetDirectory | |
Filename : See GetFilename and SetFilename | |
Filenames : See GetFilenames | |
FilterIndex : See GetFilterIndex and SetFilterIndex | |
Message : See GetMessage and SetMessage | |
Path : See GetPath and SetPath | |
Paths : See GetPaths | |
thisown : The membership flag | |
Wildcard : See GetWildcard and SetWildcard |
Class Variable Summary |
---|
Instance Method Details |
---|
__init__(self,
parent,
message=FileSelectorPromptStr,
defaultDir=EmptyString,
defaultFile=EmptyString,
wildcard=FileSelectorDefaultWildcardStr,
style=FD_DEFAULT_STYLE,
pos=DefaultPosition)
|
GetDirectory(self)Returns the default directory.
|
GetFilename(self)Returns the default filename.
|
GetFilenames(self)Returns a list of filenames chosen in the dialog. This function should only be used with the dialogs which have wx.MULTIPLE style, use GetFilename for the others.
|
GetFilterIndex(self)Returns the index into the list of filters supplied, optionally, in the wildcard parameter. Before the dialog is shown, this is the index which will be used when the dialog is first displayed. After the dialog is shown, this is the index selected by the user.
|
GetMessage(self)Returns the message that will be displayed on the dialog.
|
GetPath(self)Returns the full path (directory and filename) of the selected file.
|
GetPaths(self)Fills the array paths with the full paths of the files chosen. This function should only be used with the dialogs which have wx.MULTIPLE style, use GetPath for the others.
|
GetWildcard(self)Returns the file dialog wildcard.
|
SetDirectory(self, dir)Sets the default directory.
|
SetFilename(self, name)Sets the default filename.
|
SetFilterIndex(self, filterIndex)Sets the default filter index, starting from zero.
|
SetMessage(self, message)Sets the message that will be displayed on the dialog.
|
SetPath(self, path)Sets the path (the combined directory and filename that will be returned when the dialog is dismissed).
|
SetWildcard(self, wildCard)Sets the wildcard, which can contain multiple file types, for example: "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"
|
Property Details |
---|
DirectorySee
|
FilenameSee
|
FilenamesSee
|
FilterIndexSee
|
MessageSee
|
Path |
PathsSee
|
thisownThe membership flag |
WildcardSee
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:09:31 2007 | http://epydoc.sf.net |