property File.Type as String

Specifies the file's type.

TypeDescription
String A String expression that indicates the file's type.

The Type property specifies the type of the file. For instance, the type for a folder object is "File Folder", or for a HTML file it is "HTML Document". The Type property is defined by the system. The Type property does not retrieve the file's extension. In order to get the file's extension you have to use the Name property. The Type column of the control, displays the file types. For instance, the type for *.cpp files is "C++ source", and for *.h files is "C/C++ Header". Even if the Type property is read only you can change the file's type by using Type property of the FileType object, like in the following samples.

The following VB sample changes the string being displayed in the "Type" column, for cpp and h files: 

With ExFileView1.FileTypes
    .Add("*.cpp *.h").Type = "C++ Files"
    .Apply
End With

The s ample specifies that all files with 'cpp' and 'h' extensions should display on Type column the "C++ files" string, instead "C++ Source", and "C/C++ Header".

The screen shot shows the control before running the sample:

The screen shot shows the control after running the sample ( as you can see the "C++ Source", "C/C++ Header" strings are replaced with the "C++ Files" string ):

The following C++ sample changes the string being displayed in the "Type" column, for cpp and h files:

#include "FileType.h"
#include "FileTypes.h"
CFileType fileType = m_fileview.GetFileTypes().Add("*.cpp *.h");
fileType.SetType( "C++ Files" );
fileType.Apply();

The following VB.NET sample changes the string being displayed in the "Type" column, for cpp and h files:

With AxExFileView1.FileTypes.Add("*.cpp *.h")
    .Type = "C++ Files"
    .Apply()
End With

The following C# sample changes the string being displayed in the "Type" column, for cpp and h files:

EXFILEVIEWLib.FileType fileType = axExFileView1.FileTypes.Add("*.cpp *.h");
fileType.Type = "C++ Files";
fileType.Apply();

The following VFP sample changes the string being displayed in the "Type" column, for cpp and h files:

With thisform.ExFileView1.FileTypes.Add("*.cpp *.h")
	.Type = "C++ Files"
	.Apply()
EndWith