Specifies the pattern used to include files to the control's list, like '*.cpp *.h'
Type | Description | |||
String | A string expression that may contain wild cards like * or ?. |
Use the IncludeFilter property to include files that match a pattern. When the IncludeFilter is called, the control automatically refreshes the current list, and applies the FileType attributes. To remove a previous include filter you can use "" empty string. By default, the IncludeFilter is "". Use the ExcludeFilter to exclude files from the current list. The IncludeFolderFilter property specifies a wild characters expression that indicates the folders being included. The ExcludeFolderFilter property specifies a wild characters expression that indicates the folders being excluded. The patterns are separated by space character. Use the IncludeFiles property to include files in the control's list. Use the exHideFileExtensionsForKnownFileTypes option to show the file extensions in case your Windows Explorer, the "Hide File Extensions For Known File Types" is checked.
The following VB sample includes only the files with the extensions: 'frm', 'frx', 'vbp' and 'vbw', and colorize the items differentially:
With ExFileView1 .IncludeFilter = "*.frm *.frx *.vbp *.vbw" With .FileTypes With .Add("*.frm *.frx") .ForeColor = vbBlue End With With .Add("*.vbp") .Bold = True End With .Apply End With End With
The following C++ sample includes only the files with the extensions: 'frm', 'frx', 'vbp' and 'vbw', and colorize the items differentially:
m_fileview.SetIncludeFilter("*.frm *.frx *.vbp *.vbw"); CFileTypes fileTypes = m_fileview.GetFileTypes(); fileTypes.Add( "*.frm *.frx" ).SetForeColor( RGB(0,0,255) ); fileTypes.Add( "*.vbp" ).SetBold( TRUE ); fileTypes.Apply();
The following VB.NET sample includes only the files with the extensions: 'frm', 'frx', 'vbp' and 'vbw', and colorize the items differentially:
With AxExFileView1 .IncludeFilter = "*.frm *.frx *.vbp *.vbw" With .FileTypes With .Add("*.frm *.frx") .ForeColor = ToUInt32(Color.Blue) End With With .Add("*.vbp") .Bold = True End With .Apply() End With End With
where the ToUInt32 function converts a Color expression to an OLE_COLOR type,
Shared Function ToUInt32(ByVal c As Color) As UInt32 Dim i As Long i = c.R i = i + 256 * c.G i = i + 256 * 256 * c.B ToUInt32 = Convert.ToUInt32(i) End Function
The following C# sample includes only the files with the extensions: 'frm', 'frx', 'vbp' and 'vbw', and colorize the items differentially:
axExFileView1.IncludeFilter = "*.frm *.frx *.vbp *.vbw"; EXFILEVIEWLib.FileTypes fileTypes = axExFileView1.FileTypes; fileTypes.Add("*.frm *.frx").ForeColor = ToUInt32(Color.Blue); fileTypes.Add("*.vbp").Bold = true; fileTypes.Apply();
where the ToUInt32 function converts a Color expression to an OLE_COLOR type,
private UInt32 ToUInt32(Color c) { long i; i = c.R; i = i + 256 * c.G; i = i + 256 * 256 * c.B; return Convert.ToUInt32(i); }
The following VFP sample includes only the files with the extensions: 'frm', 'frx', 'vbp' and 'vbw', and colorize the items differentially:
With thisform.ExFileView1 .IncludeFilter = "*.frm *.frx *.vbp *.vbw" With .FileTypes With .Add("*.frm *.frx") .ForeColor = RGB(0,0,255) EndWith With .Add("*.vbp") .Bold = .t. EndWith .Apply EndWith EndWith