Sign in Join
FPDoc Onlineexperiment

TOpenDialog.DoCanClose procedure

Member of TOpenDialogpublicIn unit Dialogs

Performs actions to determine if the dialog can be closed.

Declaration

pascal
procedure DoCanClose(var CanClose: Boolean); override

Arguments

CanClose

Variable argument which indicates if the dialog can be closed.

Description

DoCanClose is an overridden method in TOpenDialog. It ensures that a dialog using the classic style (where ofOldStyleDialog is included in Options) does not call the OnCanClose event handler in the inherited method. In this situation, the CanClose argument is set to True and the internal flag used in the execution loop is set indicating that DoCanClose was called.

This behavior is Delphi VCL compatible.

For Explorer-style dialogs (where ofOldStyleDialog is not included in Options), the inherited method is called. This allows the CanClose argument to be updated when the OnCanClose event handler is signalled.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.