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

# TCustomListView.OnDeletion

Event handler signalled when a list item is deleted from the Items container.

## Declaration

Source position: comctrls.pp line 1611

`protected property TCustomListView.OnDeletion : TLVDeletedEvent read FOnDeletion write FOnDeletion;`

## Description

OnDeletion is a TLVDeletedEvent property with the event handler signalled when a list item is deleted from the Items container. It provides better compatibility with the Delete method as implemented in Delphi.

In Delphi, the Delete method is called when the Items.Delete method is called. But calling the method directly will also delete the item and then call the OnDeletion handler.

In that case we simply call Items.Delete and this will then call Delete again and in the second run we call the OnDeletion handler. Not 100% Delphi compatible, but more compatible then it was before. (BB)

## See also

TCustomListView.Delete |  | Deletes the specified list item.
TCustomListView.DoDeletion |  | Performs actions needed to delete the specified list item.