The FileList_ShowDialog() function displays a file system dialog box that allows the user to select a set of files. The selected files are returned as a file list.


FileList_ShowDialog(prompt, default_filter, default_path {, custom_filter})


prompt – A string that will be displayed in the title bar of the dialog box.

default_filter – An integer indicating the type of file you’re searching for. If you are using one of the predefined filters, this value corresponds to one of the following constants:





Displays only application files


Displays only dictionary files (.DIC)


Displays only launch files (.SET)


Displays only Dexterity macro files (.MAC)


Displays only XML files


Displays all files

If you are using a custom filter, the default_filter parameter indicates which filter in the custom filter set will be used by default. For instance, assume three filter types are defined in the custom filter. To specify that the second filter type be used as the default, use 2 for this parameter.

default_path – A string specifying the complete path of the location to be displayed in the dialog box. The path is in native format. If you do not supply a path, the current path for the application will be used.

custom_filter – An optional parameter that defines the set of custom filters to use. The value can be a string or a list field that has been filled using the FileType_FillList() function.

If a string is used to specify the custom filter list, the following syntax is used:

description |filter{;filter}|

The description parameter is a string that describes the filter, such as “Dictionaries (*.DIC)”. It must be followed by a pipe (|) character.

The filter parameter specifies a file extension, such as “*.DIC”. When this filter is used, files that match this extension will be displayed in the dialog box. The filter parameter should not contain spaces. To specify multiple filters, separate them with a semicolon (;). End the list of filters with a pipe (|) character. Several custom filters can be concatenated within the custom_filter string.

Return value

A long integer containing the ID of the file list. If the user clicks Cancel, the value 0 is returned.

Documentation Feedback