To All
Is there a control I can use to increment a number in a get like in this picure ?
Thanks
Rick Lipkin
#include "fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
LOCAL nMin := 1
LOCAL nMax := 9
LOCAL oGet, nGet := 1
DEFINE DIALOG oDlg
@ 1 , 1 GET oGet VAR nGet OF oDlg ;
PICTURE "9" ;
SPINNER ;
ON UP cambiaspin( oGet , -1 , nMin , nMax ) ;
ON DOWN cambiaspin( oGet , +1 , nMin , nMax ) ;
VALID ( nGet >= nMin .AND. nGet <= nMax )
ACTIVATE DIALOG oDlg CENTER
RETURN NIL
FUNCTION CAMBIASPIN( oGet , nStep , nMin , nMax )
LOCAL nRitorna := oget:varget()
LOCAL nOriginal := nRitorna
nRitorna := nRitorna + nStep
IF nRitorna >= nMin .AND. nRitorna <= nMax
oGet:varput( nRitorna)
oGet:refresh()
ENDIF
RETURN NIL
REDEFINE GET aGets[09] VAR nCopies ID 202 OF oDlg UPDATE;
PICTURE "99" SPINNER MIN 1 MAX 10
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Otto and 92 guests