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

TControl.DoMouseWheel

Invokes the OnMouseWheel handlers, when the wheel has been turned.

Declaration

Source position: controls.pp line 1402

protected function TControl.DoMouseWheel(

  Shift: TShiftState;

  WheelDelta: Integer;

  MousePos: TPoint

):Boolean; virtual;

Arguments

Shift

  

State of the modifier keys and mouse buttons.

WheelDelta

  

How many notches the wheel has been turned.

MousePos

  

The mouse coordinates

Function result

Set Result to True if handled.

Description

Multiple wheel handlers can be implemented. First the general OnMouseWheel handler is tried, and if it doesn't report the event handled, then OnMouseWheelUp or OnMouseWheelDown are tried.

The actual WheelDelta is available only to the OnMouseWheel handler, not to the up and down handlers [Delphi compatible].

See also

TMouseWheelEvent

  

Type of an OnMouseWheel event handler.

TMouseWheelUpDownEvent

  

Type of OnMouseWheelUp/Down event handlers.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.