[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Dialogs' (#lcl)

# TSelectDirectoryDialog

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Implements a select directory dialog.

## Declaration

Source position: dialogs.pp line 296

`type TSelectDirectoryDialog = class(TOpenDialog)`
`protected`
`class procedure WSRegisterClass; override;` |  | Registers this component class with the current WidgetSet.
`function CheckFileMustExist(); override;` |  | Checks whether a specified directory already exists, and displays a message when missing.
`function DefaultTitle; override;` |  | Gets the default title for the dialog.
`public`
`constructor Create(); override;` |  | Constructor for the class instance.
`end;`

## Inheritance

`TSelectDirectoryDialog` |  | Implements a select directory dialog.
`TOpenDialog` |  | Implements a File / Open dialog used to select one or more files on the local file system.
`TFileDialog` |  | TFileDialog allows selection of a file from the current directory.
`TCommonDialog` |  | The base type from which other dialogs are derived.
`TLCLComponent` |  | The base class for LCL components which have an associated widget.
`TComponent`
?
`TObject`

## Description

TSelectDirectoryDialog is a TOpenDialog descendant which allows the user to select a directory name by navigating file system entries. It is implemented using the native selection dialog for the platform.

Use the InitialDir property to specify the active directory when the dialog is displayed.

The FileName property contains the selected directory when the dialog is closed using the 'Select Folder' button.

The Options property can be used to control the features and behaviors enabled for the selection dialog.

Use the OnFolderChange event handler to perform actions when a new directory is entered / chosen during navigation on the dialog.

Use the OnSelectionChange handler to perform actions when a new directory is selected or highlighted using the mouse or cursor keys on the dialog.

## See also

TOpenDialog |  | Implements a File / Open dialog used to select one or more files on the local file system.
TDirectoryEdit |  | TDirectoryEdit - an EditBox to hold a directory name, with an attached SpeedButton that summons a Directory Open dialog.