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

TControl.DoCallMouseWheelEventHandler

Executes assigned mouse wheel events until a handler is found for the event notifications.

Declaration

Source position: controls.pp line 1559

protected procedure TControl.DoCallMouseWheelEventHandler(

  HandlerType: TControlHandlerType;

  Shift: TShiftState;

  WheelDelta: Integer;

  MousePos: TPoint;

  var Handled: Boolean

);

Arguments

HandlerType

  

Type for the handlers signalled in the method.

Shift

  

Shift, Ctrl, or Alt modifier for the mouse wheel event notification.

WheelDelta

  

Number of relative units that the mouse wheel was moved. Negative values indicate a move wheel up or left direction.

MousePos

  

Position of the mouse pointer when the wheel event occurred.

Handled

  

Set to True in a handler routine if the control handles the event notification.

Description

DoCallMouseWheelEventHandler iterates over the handler routines using the type specified in HandlerType. The routines are cast to the TMouseWheelEvent type used to implement the handler and receives the arguments specified in Shift, WheelDelta, MousePos, and Handled. Iteration is halted when an event handler returns True in the Handled argument, or when all handlers for the type have been signalled.

The current class instance is used as the Sender for each of the event notifications.

DoCallMouseWheelEventHandler is called from methods like DoMouseWheel and DoMouseWheelHorz.


Version 3.2 Generated 2024-02-25 Home