Skip to main content

TdxOpenPictureDialog Class

An Open dialog component for image files.

Declaration

TdxOpenPictureDialog = class(
    TdxOpenFileDialog
)

Remarks

The TdxOpenPictureDialog class implements a non-visual component that displays a skinnable Open file dialog that allows users to select and open images in the file system. The TdxOpenPictureDialog component is compatible with the standard TOpenPictureDialog component but has additional APIs for preview customization as well as look & feel settings common to all DevExpress VCL controls. These settings allow you to apply the same skin to all UI elements and maintain appearance consistency for all application components, including shell dialogs.

VCL Editors Library: Different Skin Examples

The Open dialog can display a preview of the last selected image file at the right border. You can use the OptionsPreview property to customize preview settings.

Invoke the Open Picture Dialog

You can call the component’s Execute method to invoke the Open dialog. This dialog allows a user to select and open image files. When a user clicks the Open button, the dialog saves paths to selected file names to Files and FileName properties and closes.

Main API Members

The list below outlines key members of the TdxOpenFileDialog class that allow you to configure the Open file dialog and invoke it.

Execute
Invokes the Open file dialog.
Files
Returns full paths to all files selected in the Open file dialog when a user clicks the Open button to close the dialog.
FileName
Returns the full path to the last file selected in the Open file dialog when a user clicks the Open button to close the dialog. The dialog can display a preview of the last selected file.
Filter | FilterIndex
Specify filter masks for files.
ForceFileSystem
Specifies if only actual files and folders in the file system can be dialog targets. This option is useful if you need to prevent the dialog from returning an incorrect path.
InitialDir
Specifies the initially displayed directory.
LookAndFeel
Provides access to dialog look & feel settings.
Options | OptionsEx
Allow you to configure general dialog settings.
OptionsPreview
Provides access to file preview settings.

Skinnable Shell Dialogs in DevExpress Components

All DevExpress components with built-in Windows shell navigation functionality (such as Spreadsheet and Rich Edit controls) use skinnable dialogs instead of standard system dialogs. You can change the dxUseStandardShellDialogs global constant value to True if you prefer standard system dialogs.

Create a Custom Open File Dialog

Inherit a class from TdxfrmOpenFileDialog to create a custom Open dialog form. Assign a reference to the created class to the OpenFileDialogFormClass global variable to replace the built-in Open dialog form with a custom implementation.

See Also