CFileDlg Class Description


The CFileDlg class provides an interface for using the standard Open and Save file dialogs. Various properties can be configured, including user-defined title, "file type" filter, and other properties. The Open dialog can select multiple files and the class provides methods for iterating through the list of returned file names. The Open and Save dialogs do not open and save files; rather, they allow you to select file names that may be used for opening and saving files.

Two global methods are provided which use this class internally without exfindfisting it. If you do not need to do special customizing of the Open and Save dialogs, you may find it more efficient to use the GetFileNameOpen and GetFileNameSave functions described below, under "Global Methods". These two global methods grab one file name and do not support returning a list of file names as do the class methods.

Global Methods that use the CFileDlg class

These higher-level functions use the CFileDlg class to fetch a file name. You do not need to create a CFileDlg object to use them.

GetFileNameOpen

Uses the File Open dialog to fetch a file name for opening.

GetFileNameSave

Uses the File Save dialog to fetch a file name for saving.

Class Usage

Construction

Object = CFileDlg:new()

Destruction

Object:delete()

Class Properties

These properties hold the data used to customize the dialogs used by its Open and Save methods.

Methods

Construction

new

Creates a new instance of a CFileDlg object.

delete

Deletes the instance of the CFileDlg object.

Operations

Open

Creates an Open dialog for selecting file names.

Save

Creates a Save dialog for selecting file names.

Start

Initializes the list of file names that were selected. After initialization, use Next to select each name in turn.

Next

Returns the next file name from the collection of names selected using the file dialog. This meethod returns nil when the end of the list is reached.

Related Topics

CFindFiles class

GetFileName

GetFolder