opendialog Options property
Return to Introduction  Previous page  Next page
Applies to
dcOpenDialog and dcSaveDialog components.  

Declaration
type  
  TOpenOption = (ofReadOnly, ofOverwritePrompt, ofHideReadOnly, ofNoChangeDir, ofShowHelp, ofNoValidate, ofAllowMultiSelect, ofExtensionDifferent, ofPathMustExist, ofFileMustExist, ofCreatePrompt, ofShareAware, ofNoReadOnlyReturn, ofNoTestFileCreate, ofNoNetworkButton, ofNoLongNames, ofOldStyleDialog, ofNoDereferenceLinks, ofEnableIncludeNotify, ofEnableSizing);  
  TOpenOptions = set of TOpenOption;  
 
property Options: TOpenOptions;  

Description
The Options property determines the appearance and behaviour of the file-selection dialog. Use the Options property to customize the appearance and functionality of the dialog. The possible values of Options are  
 
ValueMeaning  
ofReadOnlySelects the Open As Read Only check box by default when the dialog opens.  
ofOverwritePromptGenerates a warning message if the user tries to select a file name that is already in use, asking whether to overwrite the existing file. (Use with T[dc]SaveDialog and TSavePictureDialog.)  
ofHideReadOnlyRemoves the Open As Read Only check box from the dialog.  
ofNoChangeDirAfter the user clicks OK, resets the current directory to whatever it was before the file-selection dialog opened.  
ofShowHelpDisplays a Help button in the dialog.  
ofNoValidateDisables checking for invalid characters in file names. Allows selection of file names with invalid characters.  
ofAllowMultiSelectAllows users to select more than one file in the dialog.  
ofExtensionDifferentThis flag is turned on at runtime whenever the selected filename has an extension that differs from DefaultExt. If you use this flagin an application, remember to reset it.  
ofPathMustExistGenerates an error message if the user tries to select a file name with a nonexistent directory path.  
ofFileMustExistGenerates an error message if the user tries to select a nonexistent file. (only applies to Open dialogs).  
ofCreatePromptGenerates a warning message if the user tries to select a nonexistent file, asking whether to create a new file with the specified name.  
ofShareAwareIgnores sharing errors and allows files to be selected even when sharing violations occur.  
ofNoReadOnlyReturnGenerates an error message if the user tries to select a read-only file.  
ofNoTestFileCreateDisables checking for network file protection and inaccessibility of disk drives. Applies only when the user tries to save a file in a create-no-modify shared network directory.  
ofNoNetworkButtonRemoves the Network button (which opens a Map Network Drive dialog) from the file-selection dialog. Applies only if the ofOldStyleDialog flag is on.  
ofNoLongNamesDisplays 8.3-character file names only. This option is only valid if Options also includes ofOldStyleDialog.  
ofOldStyleDialogCreates the older style of file-selection dialog.  
ofNoDereferenceLinksDisables dereferencing of Windows shortcuts. If the user selects a shortcut, assigns to FileName the path and file name of the shortcut itself (the .LNK file), rather than the file linked to the shortcut.  
ofEnableIncludeNotifySends include notification messages to the dialog. (Windows 2000 and later.)  
ofEnableSizingAllows users to resize the dialog.  
File not found.