OpenDialog — различия между версиями

Материал из Фабиус wiki
Перейти к: навигация, поиск
м (Options)
м (Options)
Строка 19: Строка 19:
 
Selects the Open As Read Only check box by default when the dialog opens.   
 
Selects the Open As Read Only check box by default when the dialog opens.   
 
|-
 
|-
|1||ofOverwritePrompt   
+
|1||ofOverwritePrompt  ||
 
Generates 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 save dialogs.)   
 
Generates 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 save dialogs.)   
 
|-
 
|-
|2||ofHideReadOnly   
+
|2||ofHideReadOnly  ||
 
Removes the Open As Read Only check box from the dialog.   
 
Removes the Open As Read Only check box from the dialog.   
 
|-
 
|-
|3||ofNoChangeDir   
+
|3||ofNoChangeDir  ||
 
After the user clicks OK, resets the current directory to whatever it was before the file-selection dialog opened.   
 
After the user clicks OK, resets the current directory to whatever it was before the file-selection dialog opened.   
 
|-
 
|-
|4||ofShowHelp   
+
|4||ofShowHelp  ||
 
Displays a Help button in the dialog.   
 
Displays a Help button in the dialog.   
 
|-
 
|-
|5||ofNoValidate   
+
|5||ofNoValidate  ||
 
Disables checking for invalid characters in file names. Allows selection of file names with invalid characters.   
 
Disables checking for invalid characters in file names. Allows selection of file names with invalid characters.   
 
|-
 
|-
|6||ofAllowMultiSelect   
+
|6||ofAllowMultiSelect  ||
 
Allows users to select more than one file in the dialog.   
 
Allows users to select more than one file in the dialog.   
 
|-
 
|-
|7||ofExtensionDifferent   
+
|7||ofExtensionDifferent  ||
 
This flag is turned on at runtime whenever the selected filename has an extension that differs from DefaultExt. If you use this flag in an application, remember to reset it.   
 
This flag is turned on at runtime whenever the selected filename has an extension that differs from DefaultExt. If you use this flag in an application, remember to reset it.   
 
|-
 
|-
|8||ofPathMustExist   
+
|8||ofPathMustExist  ||
 
Generates an error message if the user tries to select a file name with a nonexistent directory path.   
 
Generates an error message if the user tries to select a file name with a nonexistent directory path.   
 
|-
 
|-
|9||ofFileMustExist   
+
|9||ofFileMustExist  ||
 
Generates an error message if the user tries to select a nonexistent file. (only applies to Open dialogs).   
 
Generates an error message if the user tries to select a nonexistent file. (only applies to Open dialogs).   
 
|-
 
|-
|10||ofCreatePrompt   
+
|10||ofCreatePrompt  ||
 
Generates a warning message if the user tries to select a nonexistent file, asking whether to create a new file with the specified name.   
 
Generates a warning message if the user tries to select a nonexistent file, asking whether to create a new file with the specified name.   
 
|-
 
|-
|11||ofShareAware   
+
|11||ofShareAware  ||
 
Ignores sharing errors and allows files to be selected even when sharing violations occur.   
 
Ignores sharing errors and allows files to be selected even when sharing violations occur.   
 
|-
 
|-
|12||ofNoReadOnlyReturn   
+
|12||ofNoReadOnlyReturn  ||
 
Generates an error message if the user tries to select a read-only file.   
 
Generates an error message if the user tries to select a read-only file.   
 
|-
 
|-
|13||ofNoTestFileCreate   
+
|13||ofNoTestFileCreate  ||
 
Disables 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.   
 
Disables 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.   
 
|-
 
|-
|14||ofNoNetworkButton   
+
|14||ofNoNetworkButton  ||
 
Removes the Network button (which opens a Map Network Drive dialog) from the file-selection dialog. Applies only if the ofOldStyleDialog flag is on.   
 
Removes the Network button (which opens a Map Network Drive dialog) from the file-selection dialog. Applies only if the ofOldStyleDialog flag is on.   
 
|-
 
|-
|15||ofNoLongNames   
+
|15||ofNoLongNames  ||
 
Displays 8.3-character file names only. This option is only valid if Options also includes ofOldStyleDialog.   
 
Displays 8.3-character file names only. This option is only valid if Options also includes ofOldStyleDialog.   
 
|-
 
|-
|16||ofOldStyleDialog
+
|16||ofOldStyleDialog ||
 
Creates the older style of file-selection dialog.   
 
Creates the older style of file-selection dialog.   
 
|-
 
|-
|17||ofNoDereferenceLinks   
+
|17||ofNoDereferenceLinks  ||
 
Disables 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.   
 
Disables 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.   
 
|-
 
|-
|18||ofEnableIncludeNotify   
+
|18||ofEnableIncludeNotify  ||
 
(Windows 2000 and later.) Sends CDN_INCLUDEITEM notification messages to the dialog when the user opens a folder. A notification is sent for each item in the newly opened folder. You can use these messages to control which items appear in the folder's item list.   
 
(Windows 2000 and later.) Sends CDN_INCLUDEITEM notification messages to the dialog when the user opens a folder. A notification is sent for each item in the newly opened folder. You can use these messages to control which items appear in the folder's item list.   
 
|-
 
|-
|19||ofEnableSizing   
+
|19||ofEnableSizing  ||
 
(Windows 98 and later) Lets the Explorer-style dialog be resized with the mouse or keyboard. By default, the dialog allows this resizing regardless of the value of this option. It is only required if you provide a hook procedure or custom template. (Old  
 
(Windows 98 and later) Lets the Explorer-style dialog be resized with the mouse or keyboard. By default, the dialog allows this resizing regardless of the value of this option. It is only required if you provide a hook procedure or custom template. (Old  
 
style dialogs never permit resizing.)   
 
style dialogs never permit resizing.)   
 
|-
 
|-
|20||ofDontAddToRecent
+
|20||ofDontAddToRecent ||
 
Prevents the file from being added to the list of recently opened files.   
 
Prevents the file from being added to the list of recently opened files.   
 
|-
 
|-
|21||ofForceShowHidden   
+
|21||ofForceShowHidden  ||
 
Ensures that hidden files are visible in the dialog.   
 
Ensures that hidden files are visible in the dialog.   
 
|}
 
|}

Версия 12:03, 1 июля 2016

OpenDialog - это функция

Диалог выбора файла

OpenDialog( [Title, Options, InitialDir, Filter, FilterIndex, DefaultExt] )

Title

Заголовок окна выбора файла

Options

Порядковые номера элементов перечисления TOpenOption

Код Наименование Смысл
0 ofReadOnly

Selects the Open As Read Only check box by default when the dialog opens.

1 ofOverwritePrompt

Generates 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 save dialogs.)

2 ofHideReadOnly

Removes the Open As Read Only check box from the dialog.

3 ofNoChangeDir

After the user clicks OK, resets the current directory to whatever it was before the file-selection dialog opened.

4 ofShowHelp

Displays a Help button in the dialog.

5 ofNoValidate

Disables checking for invalid characters in file names. Allows selection of file names with invalid characters.

6 ofAllowMultiSelect

Allows users to select more than one file in the dialog.

7 ofExtensionDifferent

This flag is turned on at runtime whenever the selected filename has an extension that differs from DefaultExt. If you use this flag in an application, remember to reset it.

8 ofPathMustExist

Generates an error message if the user tries to select a file name with a nonexistent directory path.

9 ofFileMustExist

Generates an error message if the user tries to select a nonexistent file. (only applies to Open dialogs).

10 ofCreatePrompt

Generates a warning message if the user tries to select a nonexistent file, asking whether to create a new file with the specified name.

11 ofShareAware

Ignores sharing errors and allows files to be selected even when sharing violations occur.

12 ofNoReadOnlyReturn

Generates an error message if the user tries to select a read-only file.

13 ofNoTestFileCreate

Disables 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.

14 ofNoNetworkButton

Removes the Network button (which opens a Map Network Drive dialog) from the file-selection dialog. Applies only if the ofOldStyleDialog flag is on.

15 ofNoLongNames

Displays 8.3-character file names only. This option is only valid if Options also includes ofOldStyleDialog.

16 ofOldStyleDialog

Creates the older style of file-selection dialog.

17 ofNoDereferenceLinks

Disables 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.

18 ofEnableIncludeNotify

(Windows 2000 and later.) Sends CDN_INCLUDEITEM notification messages to the dialog when the user opens a folder. A notification is sent for each item in the newly opened folder. You can use these messages to control which items appear in the folder's item list.

19 ofEnableSizing

(Windows 98 and later) Lets the Explorer-style dialog be resized with the mouse or keyboard. By default, the dialog allows this resizing regardless of the value of this option. It is only required if you provide a hook procedure or custom template. (Old style dialogs never permit resizing.)

20 ofDontAddToRecent

Prevents the file from being added to the list of recently opened files.

21 ofForceShowHidden

Ensures that hidden files are visible in the dialog.