From 410911ba3720679c3f362d8fc7b1b2f8259ca586 Mon Sep 17 00:00:00 2001 From: dsiders Date: Wed, 23 Apr 2025 00:03:53 -0400 Subject: [PATCH] Docs: LCL/dialogs. Additional updates to TOpenOption topcis. Based upon MR !455 by n7800 with corrections. --- docs/xml/lcl/dialogs.xml | 98 ++++++++++++++++++++++++++++------------ 1 file changed, 68 insertions(+), 30 deletions(-) diff --git a/docs/xml/lcl/dialogs.xml b/docs/xml/lcl/dialogs.xml index bb067e58fa..ba3696be4c 100644 --- a/docs/xml/lcl/dialogs.xml +++ b/docs/xml/lcl/dialogs.xml @@ -1367,22 +1367,23 @@ platforms where the value is relevant. -For the Windows platform, it causes the Read Only check box to be selected -initially when the dialog box is created. It is also used as a flag to -indicate the state of the Read Only check box when the dialog box is closed. -For QT-based platforms, it indicates that the entire dialog model is read-only. +For the Windows platform (with ofOldStyleDialog or before +Vista), it is responsible for the state of the "Read only" check box when +opening the dialog and before closing it. The user can set this check box to +ask the program to open a file in read-only mode. For QT-based +platforms, it indicates that the entire dialog model is read-only. -If the selected file exists, a message is displayed that the file will be -overwritten. +If the selected file exists, a message is displayed to confirm rewriting the +file. -For the Windows versions prior to Vista, it hides the Read Only check box on -the dialog. Not used in other widgetsets. +Windows only (with ofOldStyleDialog or before Vista): Hides the +"Read only" check box on the dialog. @@ -1393,36 +1394,71 @@ the dialog. Not used in other widgetsets. -Disables file name validation using OFN_NOVALIDATE on the Windows platform. -Allows file names with invalid characters. +Windows only: Disables file name validation using +OFN_NOVALIDATE/FOS_NOVALIDATE flags. Allows file names +with invalid characters. -Enables multi-selection in a dialog. + +Allows selection of multiple files (or folders). The selection list can be +read in the Files property (FileName also contains the +first file in the list). Affects the ofExtensionDifferent and +ofCreatePrompt flags. Not available in TSaveDialog. + + + + + -Indicates that a non-blank extension which differs from the default extension -was entered using a file open dialog. Included in the option values if the -condition occurs during execution of a dialog. Specifically excluded from the -options prior to executing a dialog. +This is a returned flag that is set when the extension of the selected +file differs from DefaultExt. It can only be returned when +DefaultExt is not empty, and the dialog call was successful +(Execute is true). For compatibility with Delphi, it is never +set if multiple files are selected (possibly with +ofAllowMultiSelect). + + + + + -Shows an error message if an entered file path does not exist. + +Prevents selection of a non-existent path. Depending on the widget set, the +error will be displayed in the dialog itself or after it is closed, when +Execute returns false. + + + + -Shows an error message if an entered file does not exist. +Doesn't allow to select a non-existent file. Depending on the +widget set, the error will be displayed in the dialog itself or after its +closing, when Execute returns false. + + + -Windows only: Enables a verification prompt when a file or directory needs to -be created for a file dialog. +Windows only: Enables a verification prompt when a file or directory needs to +be created for a file dialog. If the user decides to create a file, the dialog +box closes. Otherwise, the dialog box remains open. When using +ofAllowMultiSelect, it allows a single non-existing file to be +specified. + + + -Includes the OFN_SHAREAWARE flag on the Windows platform. +Windows only: Ignore network sharing violation errors. @@ -1439,28 +1475,27 @@ if the file or directory is read-only. See TOpenDialog.CheckFile. -For the Windows platform, the OS does not check if the item specified in a -TSaveDialog can actually be created. Includes the OFN_NOTESTFILECREATE flag on -the Windows platform. +Windows only: The OS does not check if the item specified in a +TSaveDialog can actually be created (it does not check for write +protection, a full disk, an open drive door, or network protection). -Disables and hides the Network button on the Windows platform. Not used for -other platforms. +Windows only: Hides and disables the "Network" button. -Disables long file names on the Windows platform. Used in classic-style -dialogs to force use of file names using the 8.3 format. Explorer-style -dialogs ignore this flag and always display long file names. Not used for -other platforms. +Windows only (with ofOldStyleDialog): Disables long file names and +force use the 8.3 file names format. -Windows only: Shows the dialog in the Win9x style. +Windows only: Shows the dialog in the Win9x style. In this style, an additional +"Read only" check box for the file opening mode can be displayed (depending on +ofReadOnly and ofHideReadOnly). @@ -1474,6 +1509,9 @@ itself and not the target file. Do not resolve links after Execute. This value is not explicitly used in any of the widgetset implementations. + + +