Creating Advanced File Type Filters

You can configure complex file type filters for use with the answer file with type command. By doing so you can use one function call to create the necessary strings to pass as the type.

Create File Type Filter

Click on the Add File Type Filter button to create a file type filter.

Enter A Name

The name you provide will identify the file type filter when you make calls to the GLX API.

Add A Group

A file type filter is made up of one or more groups of file extensions. To add a group click the Add Group button.

Select File Extensions

All file extensions that you have defined previously will appear in a list. Select the file extensions that are applicable to the group you are creating.

Enter Group Name

The group name will appear to the user in the answer file dialog.

Add Additional Groups

You can add as many groups as you need. In this example you see that I have added two additional groups - one for text files only and another for RTF files only.

How To Use

Now that you have defined your file type filter you can implement it in your code using the glxapp_fileTypeFilterString() call. For example, glxapp_fileTypeFilterString("Open File") would return:

All Supported Files|txt,rtf|TEXT

Text Files|txt|TEXT

RTF Files|rtf|

So the following code:

answer file "Open File" with type glxapp_fileTypeFilterString("Open File")

would display the dialog you see here.

0 Comments

Add your comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.