Bug? Spinner Behaviour

stevel05

Expert
Licensed User
Longtime User
Setting an increment value or initial value as a decimal allows the use of decimals in an editable spinner.

If the incr =1 and initial value = 0 a NumberFormatException error is thrown if a decimal is entered.

This is not the case if the value is changed programatically, it is truncated.

It would be useful to be able to set the initial Value to 0.00, to allow decimal values. Currently this is truncated by the IDE to 0, and no decimals can be manually entered.

Example attached.
 

Attachments

  • SpinnerTest.zip
    2.2 KB · Views: 213

stevel05

Expert
Licensed User
Longtime User
Thanks Erel,

I am trying to set the values using the designer where it is not possible to enter decimals that are .00.

But also doing:

B4X:
Spinner1.SetNumericItems(10.00,110.00,1.00,20.00)

Causes the same issue.
 

stevel05

Expert
Licensed User
Longtime User
OK, that'll work. Thanks
 
Top