Vcl.Dialogs.TFileTypeItems

From RAD Studio API Documentation
Jump to: navigation, search

System.Classes.TCollectionSystem.Classes.TPersistentSystem.TObjectTFileTypeItems

Delphi

TFileTypeItems = class(TCollection)

C++

class PASCALIMPLEMENTATION TFileTypeItems : public System::Classes::TCollection

Properties

Type Visibility Source Unit Parent
class public
Vcl.Dialogs.pas
Vcl.Dialogs.hpp
Vcl.Dialogs Vcl.Dialogs

Description

Collection of file type specifications.

The class TFileTypeItems represents a collection of file types for a dialog. A file type includes both a name describing the type of file and a mask typically describing the file's extension. For instance, a name might be “PDF files” and the filter “*.pdf”.

The property TCustomFileDialog.FileTypes is an instance of TFileTypeItems containing a list of file types, each of which is an instance of TFileTypeItem

To add file types to a dialog, get the TFileTypeItems instance from TCustomFileDialog.FileTypes and use the TFileTypeItems.Add method as in this sample:

with FileOpenDialog1.FileTypes.Add do begin DisplayName := ‘All Files’; FileMask := ‘*.*’; end;

See Also