RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TFileTypeItems Class

Collection of file type specifications.

Pascal
TFileTypeItems = class(TCollection);
C++
class TFileTypeItems : public TCollection;

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;

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!