ImgDlog_PromptOpenFile¶
title | Text | The title of the file selection dialog. |
defaultDir | Text | The default directory path. |
formatArrayPtr | Pointer | Image file formats. |
filePath | Text | The full pathname of the selected file in POSIX format. |
Prompts the user to select an image file through the standard file selection dialog. The file list is filtered to allow selection of images in one of the supported formats.
The title of the dialog can be specified with the title
parameter.
If omitted or empty, it defaults to “Open image...”.
Parameter defaultDir
can be used to set the directory that will be
displayed in the dialog. If omitted or empty, the dialog will display the
last used directory.
The image formats that will be displayed in the dialog can be customized
via the formatArrayPtr
parameter. If specified it must be a pointer to a text
array containing the image format identifiers. If omitted or Nil
, all supported
formats will be displayed.
If the user successfully selects an image file, the file’s full path in
POSIX format is returned in filePath
. If the user cancels the dialog an
empty string is returned.