FMX.Dialogs.TOpenDialog.OnCanClose

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnCanClose: TCloseQueryEvent read FOnCanClose write FOnCanClose;

C++

__property Fmx::Forms::TCloseQueryEvent OnCanClose = {read=FOnCanClose, write=FOnCanClose};

Properties

Type Visibility Source Unit Parent
event published
FMX.Dialogs.pas
FMX.Dialogs.hpp
FMX.Dialogs TOpenDialog

Description

Occurs when the user tries to close the dialog.

Write an OnCanClose event handler to provide custom validation of the value of FileName. File selection dialogs provide a number of built-in validations, such as checking for invalid characters, prompting for confirmation before overwriting, checking whether a file or path exists, and so on. These validations can be specified using the Options property. However, applications can provide additional validation of file names in an OnCanClose event handler.

Set the CanClose parameter to False to prevent the dialog from closing. The OnCanClose event handler is responsible for telling the user why the dialog doesn't close.

See Also