Skip to main content

TdxfrmSaveFileDialog Class

The Save As dialog form class.

Declaration

TdxfrmSaveFileDialog = class(
    TdxfrmCommonFileDialog
)

Remarks

The Save As dialog allows a user to select and save files. This dialog applies look & feel settings specified in the corresponding TdxSaveFileDialog component.

VCL Editors Library: The Save As Dialog Form

Invoke the “Save As” Dialog

You can perform one of the following actions to invoke the Save As dialog at design time:

  • Double-click the TdxSaveFileDialog component.

  • Right-click the component and select Test Dialog in the context menu.

  • Select the component’s FileName property in the Object Inspector and click an ellipsis button.

To invoke the Save As dialog at runtime, call the component’s Execute method.

Create a “Save As” Dialog Custom Form

Inherit a class from TdxfrmSaveFileDialog to create a custom Save As dialog form. Assign a reference to the created class to the SaveFileDialogFormClass global variable to replace the default Save As dialog with a custom implementation.

UI Elements

“Directory” Box
The Directory box shows the path to the opened disk or folder. A user can click a drop-down menu button to show the most recently used paths and select one of them to change the current directory. A user can also click breadcrumb nodes in the box to open the current folder’s ancestors.
Search Box
The Save As dialog has a search box in the top-right corner. A user can type text in the box to search specific files in the current directory.
“Favorites” or “Quick Access” Folder
The dialog shows the Favorites folder at the left border since Microsoft Windows 7. The Quick access folder replaces the Favorites folder in Microsoft Windows 10. They both can display a list of pinned and recently used folders.
Preview Pane
The dialog can display a preview of the last selected file on a pane at the right border. You can use the TdxSaveFileDialog component’s OptionsPreview property to customize the dialog’s preview settings.
“File Name” Box
The File Name box shows the last selected file’s name. A user can type a name of a file to select it in the current directory.
“Save As” and “Cancel” Buttons
When a user clicks the Save button, the dialog saves a selected file name to the TdxSaveFileDialog component’s FileName property. The Cancel button does not change a FileName property value. Both buttons close the Save As dialog.
See Also