Sign in Join
FPDoc Onlineexperiment

TCustomListView.Delete procedure

Member of TCustomListViewprotectedIn unit ComCtrls

Deletes the specified list item.

Declaration

pascal
procedure Delete(AItem: TListItem); virtual

Arguments

AItem

List item deleted in the method.

Description

Delete is a method used to delete the list item specified in AItem.

In Delphi, Delete is called when Items.Delete is executed. The OnDeletion event handler is signalled each time the method is called, even when list items are freed from the Items container.

The Lazarus implementation differs. It uses a flag value in AItem to determine if the method has been called when the list item is freed, or when the Delete method in the list item has been called explicitly.

Delete is called from the DoDeletion method if an overridden Delete method has been implemented. The OnDeletion event handler is signalled when Delete has been explicitly called, and when the Delete method has not been overridden.

While not 100% Delphi compatible, it is more compatible than previous LCL versions.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.