Contents
- Index
- Previous
- Next
OpenDialog method
Declaration
function OpenDialog(const InitialDir: TFileName = ''): TFileName;
Description
Displays the Open dialog box to allow the user to choose the file to open.
The optional InitialDir parameter specifies the initial directory for the dialog.
The method is synchronous. While a document is loading, the Busy property is set to True. When the document has finished loading, the OnOpenDialog event is fired and the Busy property is set to False. Typically, you should wait until the document is done loading before attempting to manipulate the document or get its current properties.
If the user clicks Cancel in the Open dialog, the OnOpenDialogCancel event is fired
Returns the name and directory path of the file selected, or the empty string ('') if the user cancels the dialog.