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

# TCustomShellListView.OnAddItem

Event handler signalled to determine if the specified file information can be added to the Items for the list view.

## Declaration

Source position: shellctrls.pas line 303

`public property TCustomShellListView.OnAddItem : TAddItemEvent read FOnAddItem write FOnAddItem;`

## Description

OnAddItem is a TAddItemEvent property used to implement the event handler. It is signalled to determine if the specified file can be added to the Items for the list view.

Arguments passed to the event handler identify the base path and file information examined in the procedure. Use the CanAdd argument to indicate if the file information can be added in a calling routine. See TAddItemEvent for more information about the event handler definition.

OnAddItem is signalled from the DoAddItem method (when assigned).

## See also

TAddItemEvent |  | Specifies an event handler signalled when an item is added to a shell control.
TCustomShellListView.Items |  | Collection of list items displayed on the list view control.
TCustomShellListView.DoAddItem |  | Signals the OnAddItem event handler when an entry is added to the Items in the control.
TCustomShellListView.PopulateWithRoot |  | Fills the list view with file system information for the directory in Root.