FMX.ListView.TListViewBase.MouseWheel

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure MouseWheel(Shift: TShiftState; WheelDelta: Integer; var Handled: Boolean); override;

C++

virtual void __fastcall MouseWheel(System::Classes::TShiftState Shift, int WheelDelta, bool &Handled);

Properties

Type Visibility Source Unit Parent
procedure
function
protected
FMX.ListView.pas
FMX.ListView.hpp
FMX.ListView TListViewBase

Description

OnMouseWheel event dispatcher.

FMX.ListView.TListViewBase.MouseWheel inherits from FMX.Controls.TControl.MouseWheel. All content below this line refers to FMX.Controls.TControl.MouseWheel.

OnMouseWheel event dispatcher.

A control calls MouseWheel in response to any of mouse wheel messages, decoding the message parameters into the shift-key state, wheel rotation, and handle, which it passes in the Shift, WheelDelta, and Handled parameters, respectively:

  • Shift indicates which shift keys--SHIFT, CTRL, ALT, and CMD (only for Mac)--were down when the pressed mouse button is released.
  • WheelDelta indicates the distance the wheel was rotated. WheelDelta is positive if the mouse was rotated upward, negative if the mouse was rotated downward.
  • Handled indicates whether the scroll bar was already moved, depending on the WheelDelta value. If one of the scrolls bars (vertical or horizontal) was already handled or it does not exist, MouseWheel tries to apply the rolling on the other scroll bar, if it exists.

Override the protected MouseWheel method to provide other responses when the mouse wheel is rotated while the cursor is over the control.

See Also