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

# TLazarusFileDialogForm.Initialize

Creates and positions child controls on the Lazarus dialog form.

## Declaration

Source position: lazdialogs.pas line 36

`public procedure TLazarusFileDialogForm.Initialize(`
`AKind: TLazFileDialogKind`
`);`

## Arguments

`AKind` |  | Dialog kind for the Lazarus dialog form instance.

## Description

Initialize is a procedure used to create and position child controls on the Lazarus dialog form appropriate for the dialog type specified in AKind.

The value in AKind is stored in an internal member in the class instance, and is used to determine the child controls configured and displayed on the Lazarus dialog form. It affects the following:

- ShellTreeView
- ShellListView
- SaveEdit
- FilterComboBox
- ButtonPanel

Initialize creates the ButtonPanel for the Lazarus dialog form, and positions it aligned to the bottom of the form instance. ButtonPanel is configured to display Ok and Cancel buttons, and uses the HandleOkClick and HandleCancelClick methods to respond to the OnClick events for the respective buttons.

Initialize uses the HandleCloseQuery method as the event handler for the OnCloseQuery event.

## See also

TLazarusFileDialogForm.ButtonPanel |  | Button panel for the Lazarus dialog form.
TLazarusFileDialogForm.ShellListView |  | Shell list view control for the Lazarus dialog form.
TLazarusFileDialogForm.ShellTreeView |  | Shell tree view control for the Lazarus dialog form.
TLazarusFileDialogForm.SaveEdit |  | Edit control used for a FileName on the dialog form.
TLazarusFileDialogForm.FilterComboBox |  | Combo box control used for the file mask filter in the Lazarus dialog form.