Sign in Join
FPDoc Onlineexperiment

TControl.DoCallNotifyHandler procedure

Member of TControlprotectedIn unit Controls

Signals handler routines for the specified control handler type.

Declaration

pascal
procedure DoCallNotifyHandler(HandlerType: TControlHandlerType)

Description

DoCallNotifyHandler is a method used to signal control handler routines which were added for the specified HandlerType.

HandlerType is a value form the TControlHandlerType enumeration which identifies the list with the routines signalled in the method.

A control handler routine is a reference to a TNotifyEvent implementation. In TControl, multiple handler routines can be added for a given handler type. DoCallNotifyHandler ensures that each of the routines is signalled using the control instance as the Sender or origin for the notification.

DoCallNotifyHandler uses the value in HandlerType to select the TMethodList with the handler routines. The CallNotifyEvents method in the TMethodList instance is called to perform the event notification.

DoCallNotifyHandler is called from methods which perform event notifications using both a published event handler property and a list of control handlers. For example: DoOnResize and DoOnChangeBounds. These methods signal the event handlers represented by the OnResize and OnChangeBounds properties. They also use DoCallNotifyHandler for their control handler types (chtOnResize and chtOnChangeBounds) to signal the additional handlers added to the control.

DoCallNotifyHandler is also called from methods which do not have a published event handler property, but may have control handlers added at run-time. For example: VisibleChanging and EnabledChanged.

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.