How can I get mouse wheel to invoke the up and down actions in a get spinner.
Thanks in advance
Otto
Hi Otto:Otto wrote:I compiled the sample but here mouse wheel does not work.
#include "Fivewin.ch"
Static oGet
Function Main()
Local oGet, oDlg, ;
nVal := -1
DEFINE DIALOG oDlg
TGet_Modify()
@ 1, 1 GET oGet VAR nVal ;
PICTURE "999" SPINNER
oGet:bChange:={ || MyFun( oDlg ) }
@ 1, 15 SAY "..."
ACTIVATE DIALOG oDlg CENTERED
Return Nil
//---------------------------------------------------------//
Static Function MyFun( oDlg )
oDlg:aControls[ 2 ]:SetText( oDlg:aControls[ 1 ]:cText() )
Return Nil
//---------------------------------------------------------//
Static Function TGet_Modify()
Override Method MouseWheel In Class TGet With UseTheWheel
Return Nil
//---------------------------------------------------------//
Static Function UseTheWheel( nKey, nDelta, nXPos, nYPos )
Local Self := QSelf()
If nDelta > 0
Self++
Else
Self--
EndIf
Return Nil
The main virtue of Override and Extend procedures is not having to touch original classes for solve very specific cases.Otto wrote:I must figure out how to implement this method into TGet class.
Unfortunately no (at least up to my version 8.02), we hope that the Harbour's people to implement it soon.Otto wrote:I use Harbour too and override I think does not exist in Harbour.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot], karinha and 93 guests