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

# TLazarusFileDialogForm.HandleSelectItem

Event handler for changes to the selected item in ShellListView.

## Declaration

Source position: lazdialogs.pas line 43

`public procedure TLazarusFileDialogForm.HandleSelectItem(`
`Sender: TObject;`
`Item: TListItem;`
`Selected: Boolean`
`);`

## Arguments

`Sender` |  | Component generating the event notification.
`Item` |  | List item selected in the ShellListView control.
`Selected` |  | Indicates that Item is selected when True.

## Description

HandleSelectItem is a procedure used as the event handler for a change to the selected item in ShellListView. It is assigned to the OnSelectItem property in ShellListView in the Initialize method.

HandleSelectItem ensures that the value in SaveEdit is updated with the Caption for the selected item in Save dialogs (Kind is ldkSaveDesktop or ldkSavePDA). For other dialog types, the OK button in ButtonPanel is enabled or disabled depending on the selection of an item in ShellListView; the OK button is Enabled when the Selected parameter contains True.

## See also

TLazarusFileDialogForm.SaveEdit |  | Edit control used for a FileName on the dialog form.
TLazarusFileDialogForm.ShellListView |  | Shell list view control for the Lazarus dialog form.
TLazarusFileDialogForm.ButtonPanel |  | Button panel for the Lazarus dialog form.