## The `filter' property

Character vector

Valid for: OpenFile, SaveFile

The `filter` property sets one or more filters (file extensions or types which will be allowed), for use in the OpenFile and SaveFile pre-defined dialogs.

It comprises one or more sets of descriptive text, a | character, and a semi-colon delimited list of supported filters. Multiple filters should be separated by a vertical bar.

Under Windows and Linux, you specify file extensions as file wildcards. For example, the filter `'Text files|*.txt;*.log|All files|*.*'` gives the user the choice of selecting "Text files" (in which case extensions .txt and .log are accepted), or "All files" (any extension is accepted).

Under MacOS, you can choose to filter either using file extensions (in which case the syntax is identical to that used for Windows and Linux), or using file types. In the latter case the filters are four-character file types rather than file extensions beginning with the wildcard '*.'. For example: `'Picture files|JPEG;PICT'` would display the description "Picture files" to the user, and allow selection of files of type JPEG and PICT. The file type `'****'` matches all file types. You can also combine both types of filter; for example, `'Text files|*.txt;TEXT'` would match files which either have the extension .txt or which are of type TEXT.

Topic: APLX Help : System Classes : Properties : filter

[ Previous | Next | Contents | Index ]