Member variable XbpFileDialog():fileFilters Foundation

Filters to apply to the files browsed in the file dialog

Attribute: EXPORTED
Data type: Array ({})
Description

The :fileFilters instance variable optionally defines filters that are used to show or hide certain files within the dialog. This is similar to using wildcards with Shell commands and affects the range of files selectable by the user. The format of the array for defining file filters is as follows:

aFilters := { {<cFilterName1>, <cExprList1>}, 
              {<cFilterName2>, <cExprList2>}, 
              ..., 
              {<cFilterNameN>, <cExprListN>} } 

<cFilterName> can be an arbitrary string that defines the name of the filter in human-readable form. <cExprList> is a string that defines one or more filter expressions that a file must match in order to be included in the file list if the filter is active. If more than one filter expression is to be defined, individual expressions must be separated by a semicolon (;). Filter expressions may contain the asterisk (*) wildcard character but no spaces.

If :fileFilters contains the empty array ({}), no file filters are defined. This is equivalent to the filter expression "*.*" (include all files).

Example:

aFilters := { {"Xbase++ Sources", "*.PRG;*.CH"}, ; 
{"All Files"      , "*.*"       }  } 

This filter definition would cause the file dialog to display two entries in its list of file filters. Selecting the entry "Xbase++ Sources" would include all .PRG- and .CH-files in the current directory in the list of files the user can select from. Files not matching the filter pattern would not be selectable. If the filter "All Files" is activated, the file dialog would display all files in the current folder.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.