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

TControl.RemoveHandler

Removes a notification handler from the list for the specified handler type.

Declaration

Source position: controls.pp line 1554

protected procedure TControl.RemoveHandler(

  HandlerType: TControlHandlerType;

  const AMethod: TMethod

);

Arguments

HandlerType

  

Control handler type for the routine removed in the method.

AMethod

  

The handler routine removed from the list of handlers for the specified type.

Description

RemoveHandler is a method used to remove the specified handler routine from the method list for a given control handler type. It removes an entry in the method list created using the AddHandler method.

HandlerType is a value from the TControlHandlerType enumeration that identifies the method list updated in the method. It is an index into the internal array of TMethodList instances used to store handler routines.

AMethod is the TMethod instance to locate and remove from the method list for the handler type. It is a reference to a TNotifyEvent implementation cast to the TMethod type used in the method list.

RemoveHandler calls the Remove method in the TMethodList instance using AMethod as an argument.

Convenience methods are provided that manage a method list for a single control type handler. For example:

See also

TControl.AddHandler

  

Adds a notification handler for the specified control handler type.

TControlHandlerType

  

Notification handler types.

TMethodList

TMethod


Version 3.2 Generated 2024-02-25 Home