Hi Everybody,
How can I have a spinner increase/decrease by 0.5 instead of 1
Thanks,
Jeff
If nDirection > 0
nValue += 1 / ( 10 ^ nDec )
else
nValue -= 1 / ( 10 ^ nDec )
Endif
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
LOCAL oGet, nVar := 1
DEFINE DIALOG oDlg
@ 1, 1 GET oGet VAR nVar;
PICTURE "99.9";
SPINNER
oGet:oVScroll:bGoUp = { || If( GetFocus() != oGet:hWnd, oGet:SetFocus(), ),;
nVar += 0.5,;
oGet:Refresh() }
oGet:oVScroll:bGoDown = { || If( GetFocus() != oGet:hWnd, oGet:SetFocus(), ),;
nVar -= 0.5,;
oGet:Refresh() }
@ 3, 1 BUTTON "&Close";
ACTION oDlg:End()
ACTIVATE DIALOG oDlg;
CENTER
RETURN NIL
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 60 guests