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

TControl.RemoveAllHandlersOfObject

Removes all control handler types for the specified object.

Declaration

Source position: controls.pp line 1759

public procedure TControl.RemoveAllHandlersOfObject(

  AnObject: TObject

); override;

Arguments

AnObject

  

Object (TControl) associated with the handler routine removed in the method.

Description

RemoveAllHandlersOfObject is an overridden method in TControl used to remove all handler routines for the specified object instance found in the internal storage for the control handler types.

AnObject is the control associated with handler routines located and removed in the method. It allows handler routines added at run-time to be removed prior to destroying the object instance in AnObject.

RemoveAllHandlersOfObject visits each of the TMethodList instances used for each of the TControlHandlerType values. It calls the RemoveAllMethodsOfObject method in the TMethodList instance to remove associations where AnObject is the target.

The method can be overridden in descendent classes to provide additional functionality needed for derived controls.

See also

TControl.AddHandler

  

Adds a notification handler for the specified control handler type.

TControlHandlerType

  

Notification handler types.

TMethodList

TLCLComponent.RemoveAllHandlersOfObject

  

Override this method to remove all references to notification handlers in AnObject.


Version 3.2 Generated 2024-02-25 Home