VLPropertyList Reference

Filter

See Also See Also Applies To Applies To

Returns or sets a filter of the file selection dialog box used for editing the property having EditorType is set to vlFileEditor.

 

Syntax

object.Filter [= string]

 

The Filter property syntax has these parts:

PartDescription
object An object expression that evaluates to CProperty
string A file filter for the File Selection dialog.

 

Remarks

A filter specifies the type of files that are displayed in the dialog box's file list box. For example, selecting the filter *.txt displays all text files.

Use this property to provide the user with a list of filters that can be selected when the file selection dialog box is displayed for editing the property value.

Use the pipe ( | ) symbol (ASCII 124) to separate the description and filter values. Don't include spaces before or after the pipe symbol, because these spaces will be displayed with the description and filter values.

The following code shows an example of a filter that enables the user to select text files or graphic files that include bitmaps and icons:

Text (*.txt)|*.txt|Pictures (*.bmp;*.ico)|*.bmp;*.ico