TCustomUpDown.AssociateMouseWheel procedure
Implements an OnMouseWheel event handler assigned to the Associate control in the class instance.
Declaration
procedure AssociateMouseWheel(Sender: TObject; Shift: TShiftState;
WheelDelta: Integer; MousePos: TPoint;
var Handled: Boolean)Arguments
Sender | Control (Associate) generating the event notification. |
Shift | Shift, Ctrl, or Alt modifier for the mouse wheel event. |
WheelDelta | Units of movement and direction for the mouse wheel event. |
MousePos | Coordinates for the mouse pointer when the mouse wheel event was detected. |
Handled | Returns True if the mouse wheel event was handled in the routine. |
Description
AssociateMouseWheel is assigned as an OnMouseWheel handler routine
for the control in the Associate property. It ensures that a mouse wheel event
in Associate is applied to the Up/Down control by calling its AdjustPos method.
WheelDelta indicates the direction the mouse wheel was scrolled. A positive non-zero value indicates the mouse wheel was scrolled upwards. A negative non-zero value indicates the mouse wheel was scrolled downwards.
AdjustPos is called to apply the change to the control by incrementing or decrementing the value in Position as needed. The Handled argument is set to True if the wheel event was applied to the control.
No actions are performed in the method when WheelDelta contains 0. Handled is set to False in this situation.
AssociateMouseWheel is assigned when a control is assigned to the Associate property.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
