Event XbpCrt():wheel Foundation
Mouse wheel was operated.
:wheel := {| aPos, aWheel, self | ... }
:wheel( <aPos>, <aWheel> ) --> self
xbeM_Wheel (1048599)
Constant | Description |
---|---|
XBP_MK_LBUTTON | Left mouse button is pressed |
XBP_MK_MBUTTON | Middle mouse button is pressed |
XBP_MK_RBUTTON | Right mouse button is pressed |
XBP_MK_CONTROL | Ctrl key is pressed |
XBP_MK_SHIFT | Shift key is pressed |
This method returns the object executing the method (self).
The xbeM_Wheel event is generated when the user rotates the mouse wheel and mouse events have been enabled via a call to SetMouse(.T.).
The xbeM_Wheel event is always sent to the Xbase Part that has input focus, no matter whether or not the mouse pointer is located within or outside the area of the Xbase Part. All classes derived from XbpWindow that display data which can be vertically scrolled have a default behavior to process this event. This applies to the following classes:
Class name |
---|
XbpBrowse |
XbpCombobox (XBPCOMBO_DROPDOWNLIST) |
XbpListbox |
XbpMLE |
XbpQuickBrowse |
XbpSpinbutton |
XbpTreeview |
If the :wheel() method is overloaded, the number of rows to scroll can be calculated from the number of rows displayed by the Xbase Part and the second element of <aWheel>:
nResolution := 360 // 240, 480 changes scrolling speed
nRowsToScroll := Int( nRowCount * aWheel[2] / nResolution )
When the first element of <aWheel> is not equal to zero, the $ operator can be used to check which additional keys are pressed while the mouse wheel is rotated. For example:
nEvent := AppEvent( @mp1, @mp2, @oXbp )
IF nEvent == xbeM_Wheel
IF XBP_MK_SHIFT $ mp2[1]
// code for Shift key processing
ENDIF
ENDIF
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.