Hi Everybody,
How can I have a spinner increase/decrease by 0.5 instead of 1
Thanks,
Jeff
Thanks,
Jeff Barnes
(FWH 16.11, xHarbour 1.2.3, Bcc730)
Jeff Barnes
(FWH 16.11, xHarbour 1.2.3, Bcc730)
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 )
EndifThanks for the quick reply Antonio but that will not solve my probelm.
I use 4 different spinners, only one of them needs to adjust by 0.5 the rest of them need to adjust by 1
Jeff
#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 NILEnrico,
You are right. Thanks! ![]()
Thanks Enrico,
That's exactly what I needed.
Jeff