This class represents the file chooser dialog.
The path and filename are distinct elements of a full file pathname. If path is ?wxEmptyString, the current directory will be used. If filename is ?wxEmptyString, 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.
The typical usage for the open file dialog is:
The typical usage for the save file dialog is instead somewhat simpler:
Remark: All implementations of the
Styles
This class supports the following styles:
See:
This class is derived (and can use functions) from:
wxWidgets docs:
Constructor.
Use
Destructor.
Returns the default directory.
Returns the default filename.
Note: This function can't be used with dialogs which have the
Fills the array
This function should only be used with the dialogs which have
Note that under Windows, if the user selects shortcuts, the filenames include paths, since the application cannot determine the full path of each referenced file by appending the directory containing the shortcuts to the filename.
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.
Returns the message that will be displayed on the dialog.
Returns the full path (directory and filename) of the selected file.
Note: This function can't be used with dialogs which have the
Fills the array
This function should only be used with the dialogs which have
Returns the file dialog wildcard.
Sets the default directory.
Sets the default filename.
In wxGTK this will have little effect unless a default directory has previously been set.
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: "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif".
Note that the native Motif dialog has some limitations with respect to wildcards; see the Remarks section above.