FileOpenDialog
Displays a file open dialog.
Syntax
-
FileOpenDialog(fn, filters[, MultiSelect])
-
fn
is a string -
filters
is a list of strings -
MultiSelect
is a boolean
-
Description
FileOpenDialog
displays a file open dialog in which the user can select one or more files.
-
fn
is the default file name. -
filters
is a list of file type filters. Each filter is a string of the formtext|mask
wheretext
is the displayed text of the filter (such as “Text files”), andmask
is the file name mask (such as “*.txt”). -
Iff
MultiSelect
istrue
, the user can select several files; otherwise, only a single file can be selected. The default value isfalse
.
If the user selects one or more files, then the function returns the selected file name (if ¬MultiSelect
) or a list of the selected file names (if MultiSelect
). If the user cancels the dialog, an error is raised, which can optionally be handled using the try
or the succeeded
function.