FileOpenDialog

Inheritance Hierarchy

          IComponent

          IFileDialog

          IFileOpenDialog

          FileOpenDialog

Description

The FileOpenDialog component is used to organize the open file dialog.

Working with the Component

Using different component properties the files available in the dialog can be determined. To initialize this dialog call in the code the  Execute method. After selecting the folder and clicking the Save button the file is available in the  FileName property. If more than one files are selected, the selected collection is available in the  FileNames property.

After all dialog parameters have been configured you can view results of the work without having to compile the main form. To do this select the Check option in the context menu in a file opening dialog.

Example

Properties of the FileOpenDialog Component

  Property name Brief description
CheckFileExists The CheckFileExists property determines the system reaction if a user selects a non-existing file.
CheckPathExists The CheckPathExists property determines the system reaction if a user selects a file in a non-existing directory.
ComponentCount The ComponentCount property returns the number of child components.
Components The Components property returns the child component.
Data The Data property stores any custom data.
DefaultExt The DefaultExt property determines the file extension, which is default for this dialog.
DereferenceLinks The DereferenceLinks property determines the value, which the dialog returns when a tag is selected.
FileName The FileName property returns the name and path to the directory of the last selected file.
FileNames The FileNames property returns the collection of names and paths to files, when more than one file is selected.
Filter The Filter property determines the text of the current filter for entering data.
FilterIndex The FilterIndex property determines, which file syntax, specified in the Filter property, must be set default on opening the dialog.
InitialDirectory The InitialDirectory property determines the directory, which opens by default, when a dialog is opened.
MultiSelect The MultiSelect property determines whether the multiple selection of files in the dialog box is possible.
Name The Name property determines the component name.
ReadOnlyChecked The ReadOnlyChecked property determines the state of the Read-only flag of the dialog.
ShowHelp The ShowHelp property determines whether the Help button is displayed in the dialog window.
ShowReadOnly The ShowReadOnly property determines whether the flag used to select mode of file opening is displayed in the dialog.
Tag The Tag property is not used by the compiler. A user can change the value of the Tag property and use it as he wishes.
Title The Title property determines the title of the dialog window.
ValidateNames The ValidateNames property determines the correctness of using the file name.

Methods of the FileOpenDialog Component

  Method name Brief description
Execute The Execute method initializes a save file dialog.

See also:

Standard Components