2.250 .pattern

This attribute defines a pattern for the choices of a filereq object. Only directories and files matching this pattern are displayed. If "" is given, all files and directories (Motif *, Windows *.*) are listed.

Definition

  • Data type

    string

  • Access

    get, set

  • changed event

    no

Particularities of Motif

On Motif the pattern is a regular expression that can be changed by the user. The functional range is determined by Motif, therefore just the most important expressions are given below.

Expression

Meaning

*

none or any number of arbitrary characters

?

one arbitrary character

[a-z]

one character from the range of a-z, e.g. a lowercase letter

[0123]

one character from the enumeration 0, 1, 2, 3

Particularities of Microsoft Windows

The pattern is only effective in the modesfr_load and fr_save. Microsoft Windows expects a list of type labels with file extensions. The user only sees the type labels as choices and cannot enter different file extensions. Type labels and file extensions are separated by tabulator characters "\t". Multiple file extensions for one type label are separated by semicolons ";".

Example

.pattern "IDM files\t*.idm;*.dlg;*.mod\tDocuments         ...\
(*.doc)\t*.doc;\tAll files (*.*)\t*.*";