| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > SelectFileClass > SelectFileClass Methods >====== AddMask (add file dialog file masks) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[selectfileclass methods.htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[ask display windows file dialog .htm|{{btn_next_n.gif|Next page}}]] | | || | | **AddMask** | **( **|// description, masks//** **| **)** | | | | | //mask string// | | {{blk2blue.jpg|blk2blue.jpg}} | **AddMask** | Adds file masks to the file dialog's **List Files of Type** drop-down list. | | //description// | A string constant, variable, EQUATE, or expression that contains a file mask description such as 'all files-*.*' or 'source files-*.inc;*.clw'. The mask value may be included in the description for information only. | | //masks// | A string constant, variable, EQUATE, or expression that defines the file mask or masks corresponding to the //description//, such as '*.*' or '*.inc;*.clw'. Multiple masks are separated by a semi-colon (;). | | //mask string// | A string constant, variable, EQUATE, or expression that defines both the file masks and their descriptions. | The **AddMask **method adds file masks and their descriptions to the file dialog's **List Files of Type** drop-down list. The first mask is the default selection in the file dialog. The SetMask method replaces file masks and their descriptions. The //mask string //parameter must contain one or more descriptions followed by their corresponding file masks in the form description|masks|description|masks. All elements in the string must be delimited by the vertical bar (|). For example, **'all files *.*|*.*|Clarion source *.clw;*.inc|*.clw;*.inc'** defines two selections for the File Dialog's **List Files of Type** drop-down list.See the //extensions //parameter to the FILEDIALOG function in the //Language Reference// for more information. **Example:** **FileMask CSTRING('Text *.txt|*.txt|All *.*|*.*')  !File dialog file masks** ** CODE** ** !program code** **    IF EVENT() = EVENT:OpenWindow                 !on open window** **   SelectFile.Init                                !initialize SelectFile object** **   SelectFile.SetMask('Clarion source','*.clw;*.inc')!set default file mask** **   SelectFile.AddMask(FileMask)                   !set additional file masks** **  END** **See Also:**     [[setmask set file dialog file masks .htm|SetMask]]