FileOpenDialog

Inheritance Hierarchy

          IComponent

          IFileDialog

          IFileOpenDialog

          FileOpenDialog

Description

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

Working with the Component

Various component properties can be used to determine which files can be selected in the dialog box. To initialize the dialog box, call the Execute method in the code. After selecting the folder and clicking the Save button the file is available in the  FileName property. If more than one file is selected, the selected collection is available in the FileNames property.

After all dialog box parameters have been set, 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 the file open dialog box.

Example

Properties of the FileOpenDialog Component

  Property name Brief description
CheckFileExists The CheckFileExists property determines the system reaction if the user selects a non-existing file.
CheckPathExists The CheckPathExists property determines the system reaction if the 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 is used to store any custom data.
DefaultExt The DefaultExt property determines the file extension, which is used by default by this dialog box component.
DereferenceLinks The DereferenceLinks property determines the value returned by the dialog box when a tag is selected.
FileName The FileName property returns the name and the 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 of added filters is set by default on opening the dialog box.
InitialDirectory The InitialDirectory property determines the directory, which opens by default when the dialog box opens.
MultiSelect The MultiSelect property determines whether multiple files can be selected in the dialog box.
Name The Name property determines a component name.
ReadOnlyChecked The ReadOnlyChecked property determines the state of the Read-Only checkbox of the dialog box.
ShowHelp The ShowHelp property determines whether the Help button is displayed in the dialog box.
ShowReadOnly The ShowReadOnly property determines whether the checkbox that is used to select mode of file opening is displayed in the dialog box.
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 a dialog box title.
ValidateNames The ValidateNames property determines whether file name correctness is checked.

Methods of the FileOpenDialog Component

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

See also:

Standard Components