TColorButton.OnMouseWheel property
Event handler for mouse wheel turned.
Declaration
property OnMouseWheel:;Description
OnMouseWheel is a
TMouseWheelEvent property with the
event handler signalled when a mouse wheel movement occurs in for the
control. By default all mouse wheel actions are translated into scroll
events. Write an OnMouseWheel handler to react when the mouse wheel is
rotated.
Arguments for the event handler routine include:
- Sender
- The control for the event notification.
- Shift
- The shift modifier in effect when the action occurred.
- WheelDelta
- The relative number of units and direction the mouse wheel was rotated.
- MousePos
- The location for the mouse pointer when the event occurred.
- Handled
- A variable argument which indicates if the mouse wheel movement is handled in the event handler.
OnMouseWheel is signalled (when assigned) from the DoMouseWheel method, and occurs when the LM_MOUSEWHEEL message is handled in the WMMouseWheel method. If the event handler does not set the Handled argument to True, other assigned handler routines are signalled. These include control handlers added using the AddHandler method, as well as OnMouseWheelDown and OnMouseWheelUp.
The value in WheelDelta argument is used to determine the handler signalled. OnMouseWheelUp is used when the delta value (or the relative number of units of movement) is 0 (zero) or a positive number. OnMouseWheelDown is used when the delta value is a negative number.
Neither OnMouseWheelUp nor OnMouseWheelDown include the wheel delta value; they are simple notifications that the event has occurred at a given position.
This description is the one of Controls.TControl.OnMouseWheel.
See also
- OnMouseWheelDown
- OnMouseWheelLeft
- OnMouseWheelRight
- OnMouseWheelUp
- DoMouseWheel
- WMMouseHWheel
- DoCallMouseWheelEventHandler
- TMouseWheelEvent
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
