Sign in Join
FPDoc Onlineexperiment

TCustomTreeView.DoMouseWheel function

Member of TCustomTreeViewprotectedIn unit ComCtrls

Handles mouse wheel messages for the tree view control.

Declaration

pascal
function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; 
 MousePos: TPoint): Boolean; override

Arguments

Shift

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

WheelDelta

Number of "clicks" that the mouse wheel was moved.

MousePos

TPoint instance with the coordinates for the mouse pointer when the mouse wheel event was detected.

Function result

Returns True if the mouse wheel event was handled.

Description

DoMouseWheel is an overridden method in TCustomTreeView. It calls the inherited method on entry to signal OnMouseWheel handlers (when assigned). If the event is not handled in the ancestor class, the value in WheelDelta is used to scroll the visible tree nodes by the corresponding number of nodes for the default item height.

Scroll bar positions are updated to reflect the new origin for the tree view control. The tool tip for the current mouse pointer position is also updated prior to exit.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.