RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomForm.Notification Method

Responds to notifications that objects are about to be inserted or removed.

Pascal
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
C++
virtual __fastcall Notification(TComponent * AComponent, TOperation Operation);

Notification is called when the component specified by AComponent is about to be inserted or removed, as specified by Operation. By default, forms pass along the notification to their owned components, if any. In addition, Notification makes internal adjustments if the main menu is added or deleted. 

A form can, if needed, override Notification to make other adjustments when components are inserted or removed. In particular, if a form has object fields or properties that contains references to other components, it might check the notifications of component removals and invalidate those references as needed. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!