Sign in Join
FPDoc Onlineexperiment

TDirectoryEdit.CreateDialog function

Member of TDirectoryEditprotectedIn unit EditBtn

Creates and configures the dialog for the control.

Declaration

pascal
function CreateDialog: TCommonDialog; virtual

Function result

Dialog created and configured in the method.

Description

CreateDialog is a TCommonDialog function which creates and configures the Directory Open dialog executed when the Button is clicked for the control. In TDirectoryEdit, the class type instantiated and used as the return value is actually TSelectDirectoryDialog.

CreateDialog ensures that values for the InitialDir and FileName properties in the dialog are set using the properties in the class instance. Directory and Filename are used in the dialog when the directory exists on the local file system. Otherwise, the initial directory is set to the value in RootDir and the file name is set to the value in Directory.

CreateDialog set the options in the dialog to the values specified in DialogOptions, and the value in DialogTitle is used as the title for the dialog.

CreateDialog is used in the implementation of the RunDialog method.

See also

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