FileView
The FileView control is used to display file content. The control is a host for different file viewer implementations. Each file type (defined by file extension) requires a specific viewer control. By default, system comes with:
- Built-in Image Viewer
- Built-in Web Browser Viewer
- Built-in Auto Cad Viewer (requires AutoCad installed on client PC)
- Built-in Open Office Viewer (requires OpenOffice installed on client PC)
- Built-in Fast Report (.fr3) Viewer
You can register a new file type via System Management→File Viewers
app. For example, if it is an image type like .png or .tiff, you will select 'Built-in Image Viewer’. If it is a type you can open in a web browser like .pdf or .docx, you will use 'Built-in Web Browser Viewer'.
Or you can use 'Custom Viewer Library', where you can develop your own .dll for displaying a specific file format and register it in the system. See 'CustomViewer' example in Application Center install directory.
The FileView
inherits all the methods and properties from the base class View
.
Constructor:
constructor(parent: View)
Creates an instance of FileView control.parent
: the View containing the control itself
Properties:
source: string | DocumentFile | FilesView
Data needed to initialize FileView. It can be a file path, a DocumentFile object or a FilesVIew control instance(it will display the currently focused file in the FilesVIew).kind: string
Allows you to force the kind of underlying viewer implementation. For example, if you specify .html, it will force each file to be displayed using 'Build-in Web Browser Viewer'. If left empty, the control will automatically try to determine which viewer implementation to use (using file extension).