wxfiledialog()
Description
Displays a dialog (normally an OS common dialog) to allow the selection or the entering of a file name. The same function is used for both files being selected for opening as well as for saving. The behavior of the dialog is dependent on the values passed.
Prototype
wxfiledialog
(
type(wxdialogparent)
,
string parent
,
string message
,
string defaultdirectory
,
string defaultfilename
,
string wildcard
,
string style
,
string filename
)
result
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
parent | .nul | type(wxdialogparent) | Gives the parent of the common dialog, if any. |
message | "" | string | The text shown in the title bar of the common dialog. |
defaultdirectory | "" | string |
The directory in which the dialog first starts. If this is "" then where it will start is dependent on the operating system. On Windows 2000, XP and later:
On Windows 98 and Me:
On earlier versions of Windows and Windows NT:
|
defaultfilename | "" | string | The default value that will be shown for the file name. |
wildcard | "" | string |
This allows the showing of various categories of files, such as
*.sma . The wildcard may be a specification for
multiple types of file with a description for each, such as:
"BMP and GIF files (*.bmp;*.gif)|*.bmp;*.gif|PNG files
(*.png)|*.png" .
|
style | open,mustexist | string |
This is a comma delimited list of one of either open or
save and any of:
mustexist,overwriteprompt,multiple . Commonly
open is associated with
mustexist and save with
overwriteprompt but there are cases that are
exceptions.
|
filename | .nul | string |
The selected file name(s) will be returned in the string object passed as this
parameter. It must be an existing (preinitialized) object. If using
the multiple style and multiple names are
selected, the fully-qualified path and file names will be returned in
a character "{0}" delimited string, i.e.
"foo.txt{0}foobar.txt{0}foobar2.txt" where the string "{0}"
represents the single character with the value 0.
|
result | .nul | string |
The result (either "ok" or "cancel" )
will be returned in the string object passed as this parameter. It
must be an existing (preinitialized) object.
|