BBjFileChooser::addFileFilter
Description
In BBj 7.00 and higher, this method adds a file filter to the BBjFileChooser dialog.
Syntax
Return Value | Method |
---|---|
void | addFileFilter(String name, String filter) |
void | addFileFilter(String name, BBjVector filters!) |
Parameters
Parameter | Description |
---|---|
name | The name of the filter to identify it in other methods and to show a label to the user. See Remarks for more details. |
filter | A file glob description. |
filters! | A vector of "file glob" descriptions. See Remarks for more details. |
Return Value
None.
Remarks
The name of the filter will be the description shown to the user in addition to the identifier BBj uses to add and remove the file filter.
The filters can be any characters, following standard "file glob" syntax. The '*' character corresponds to any number of characters (including zero). The '?' character corresponds to a single character. The backslash "\" may be used to escape either character. See the example code.
The BBjVector form of the method allows combining multiple file filters under one name. For instance *.jpg" and *.png" could both be named Image Files.
With the BUI client-side file chooser, setting a filter does not affect which files may be selected by the user. When the user clicks OK, the selected filename(s) are compared to the current filter; the selection is only allowed if all selected filename(s) match the filter. See Interacting with client files in BUI and DWC for a detailed discussion of the BUI and DWC client-side file choosers.
Example
|
See Also
BBjFileChooser::getActiveFileFilter
BBjFileChooser::getFileFilterContents
BBjFileChooser::getFileFilterNames
BBjFileChooser::removeFileFilter
BBjFileChooser::setActiveFileFilter
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.