I have fixed that in TSBrowse, here the new MouseWheel method:
- Code: Select all Expand view RUN
METHOD MouseWheel( nKeys, nDelta, nXPos, nYPos ) CLASS TSBrowse
Local nWParam, ;
aPoint := { nYPos, nXPos }
ScreenToClient( ::hWnd, aPoint )
If ! IsOverWnd( ::hWnd, aPoint[ 1 ], aPoint[ 2 ] )
Return Super:MouseWheel( nKeys, nDelta, nXPos, nYPos )
EndIf
nDelta /= 120
If ( nDelta ) > 0
If ::nWheelLines != Nil
nWParam := SB_LINEUP
nDelta := ::nWheelLines * nDelta
Else
nWParam := SB_PAGEUP
EndIf
Else
If ::nWheelLines != Nil
nWParam := SB_LINEDOWN
nDelta := ::nWheelLines * Abs( nDelta )
Else
nWParam := SB_PAGEDOWN
nDelta := Abs( nDelta )
EndIf
EndIf
While nDelta > 1
::VScroll( nWParam, 0 )
nDelta--
EndDo
Return ::VScroll( nWParam, 0 )
For Antonio, here a proposed MouseWheel method for xBrowse:
- Code: Select all Expand view RUN
METHOD MouseWheel( nKeys, nDelta, nXPos, nYPos ) CLASS TXBrowse
Local aPoint := { nYPos, nXPos }
ScreenToClient( ::hWnd, aPoint )
if ! IsOverWnd( ::hWnd, aPoint[ 1 ], aPoint[ 2 ] )
Return Super:MouseWheel( nKeys, nDelta, nXPos, nYPos )
endif
if lAnd( nKeys, MK_MBUTTON )
if nDelta > 0
::PageUp()
else
::PageDown()
endif
else
if nDelta > 0
::GoUp()
else
::GoDown()
endif
endif
Return nil
Regards.
Manuel Mercado