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

# TListWithEvent

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Implements a list with an event signalled when values are added or removed.

## Declaration

Source position: lcltype.pp line 2815

`type TListWithEvent = class(TList)`
`protected`
`procedure Notify(); override;` |  | Handles the notification when a value is added to or removed from the list.
`public`
`property OnChange: TListChangeEvent; [rw]` |  | Event handler signalled when a value is added to or removed from the list.
`end;`

## Inheritance

`TListWithEvent` |  | Implements a list with an event signalled when values are added or removed.
`TList`
?
`TObject`

## Description

TListWithEvent is a TList descendant which implements a list with an event handler signalled when values are added to or removed from the container. It provides an overridden Notify method which signals the event handler (when assigned) for add or delete operations. Assign an object procedure using the signature in TListChangeEvent to the OnChange event handler to respond to the notification.

## See also

TListWithEvent.OnChange |  | Event handler signalled when a value is added to or removed from the list.
TListWithEvent.Notify |  | Handles the notification when a value is added to or removed from the list.
TListChangeEvent |  | Specifies an event handler signalled when a value in a TListWithEvent instance is modified.
TList