I have a project where I want to set the percision (number of decimal places) on a SpinBar to 4 (aka 0.0001). No matter what I do I can't get it work. It usually just gives me 3 places instead (0.001) or sometimes even resets it to zero places (0).
My end goal is to have the precision set at run time depending on the measuring units the user wants to use. Thus if the user wants to enter the value in millimeters, the SpinBox will have a range of 0.000 to 0.400, or if using inches then the SpinBox will have a range of 0.0000 to 0.0160.
In my program I have tried setting the SpinBox directly with values for Max and Step without success. Thinking it might be Gambas assuming I am using a different datatype, I tried the following:
Public Sub CBUnits_Click()
Dim fStep As Float
Dim fMax As Float
If CBUnits.Index = 0 Then
fStep = 0.0001
fMax = 0.0160
Else
fStep = 0.001
fMax = 0.400
Endif
SBMeasured.Step = fStep
SBMeasured.MaxValue = fMax
End
But again, no success. Any ideas?