Merge branch 'LCL/Dialogs/TOpenOptionDocs' into 'main'

DOCS/LCL: Improved descriptions of TOpenOption enumeration items. Issues #41365, #41564.

See merge request freepascal.org/lazarus/lazarus!455
This commit is contained in:
n7800 2025-04-19 12:03:26 +00:00
commit e9c98d0b8a
2 changed files with 9 additions and 9 deletions

View File

@ -184,21 +184,21 @@ type
{ TOpenDialog }
TOpenOption = (
ofReadOnly, // Causes the Read Only check box to be selected initially when the dialog box is created. This flag indicates the state of the Read Only check box when the dialog box is closed.
ofOverwritePrompt, // If selected file exists, show a message that file will be overwritten.
ofHideReadOnly, // Windows only: Hides the Read Only check box (pre-Vista).
ofReadOnly, // For the Windows (with ofOldStyleDialog or before Vista), it responsible for the state of the "Read only" check box (after opening and before closing). For QT platforms, it indicates that the dialog model is read-only.
ofOverwritePrompt, // If the selected file exists, asks confirming the rewriting.
ofHideReadOnly, // Windows only (with ofOldStyleDialog or before Vista): Hides the "Read only" check box.
ofNoChangeDir, // Do not change current directory.
ofShowHelp, // Show a help button.
ofNoValidate, // Windows only: Disable file name validation. Allow file names with invalid characters.
ofAllowMultiSelect, // Allow multi-selection in dialog.
ofExtensionDifferent, // Option is set after the dialog is executed (so, don't set it yourself) if DefaultExt<>'' and Extension<>DefaultExt.
ofPathMustExist, // Show an error message if selected path does not exist.
ofFileMustExist, // Show an error message if selected file does not exist.
ofAllowMultiSelect, // Allows to select multiple files or folders, their list can be read in the "Files" property. Not available in TSaveDialog.
ofExtensionDifferent, // This is only a returned flag that is set when the Extension<>DefaultExt (if DefaultExt is not empty and Execute return true). Never set if multiple files are selected.
ofPathMustExist, // Do not return non-existent paths.
ofFileMustExist, // Do not return non-existent files.
ofCreatePrompt, // Windows only: Enable a verification prompt when a file or directory needs to be created for a file dialog.
ofShareAware, // Include the OFN_SHAREAWARE flag on the Windows platform.
ofNoReadOnlyReturn, // Do not return file names that are read-only.
ofNoTestFileCreate, // Windows only: the OS does not check if the item as specified in the TSaveDialog can actually be created.
ofNoNetworkButton, // Windows only: Disable and hide the Network button on the Windows platform.
ofNoNetworkButton, // Windows only: Hides and disables the "Network" button.
ofNoLongNames, // Windows only (with ofOldStyleDialog): Disables long file names and force use the 8.3 file names format.
ofOldStyleDialog, // Windows only: Shows the dialog in the old Win9x style.
ofNoDereferenceLinks, // Windows only: When choosing a file shortcut (*.lnk), return the shortcut itself, not the target file.

View File

@ -899,7 +899,7 @@ begin
Result := 0;
if ofAllowMultiSelect in Options then Result := Result or FOS_ALLOWMULTISELECT;
if ofCreatePrompt in Options then Result := Result or FOS_CREATEPROMPT;
//if ofExtensionDifferent in Options then Result := Result or FOS_STRICTFILETYPES; //that's just wrong
// ofExtensionDifferent is returned flag
if ofFileMustExist in Options then Result := Result or FOS_FILEMUSTEXIST;
if ofNoChangeDir in Options then Result := Result or FOS_NOCHANGEDIR;
if ofNoDereferenceLinks in Options then Result := Result or FOS_NODEREFERENCELINKS;