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

# TCustomButtonPanel.Notification

Called by components that are freed and which received a FreeNotification.

## Declaration

Source position: buttonpanel.pas line 94

`protected procedure TCustomButtonPanel.Notification(`
`AComponent: TComponent;`
`Operation: TOperation`
`); override;`

## Arguments

`AComponent` |  | Component for the notification.
`Operation` |  | Operation performed for the component.

## Description

Notification is called whenever a child component is destroyed, inserted or removed from the list of owned components. Components that were requested to send a notification when they are freed (with FreeNotification) will also call Notification when they are freed.

The AComponent parameter specifies which component sends the notification, and Operation specifies whether the component is being inserted into or removed from the child component list, or whether it is being destroyed.

Notification is overridden in TCustomButtonPanel to ensure that TPanelBitBtn instances which are freed are excluded from the ShowButtons property, and their internal storage is Nil'd. If the panel control is not being destroyed, the remaining buttons are re-sized and re-aligned.

## See also

TCustomButtonPanel.ShowButtons |  | Indicates the buttons displayed on the panel.
TComponent.Notification