I have create SpinnerItem:
and later I setup value
And on screen i see value: 2.200000047683716
If I click up or down i see 2.300000047683716 or
2.100000047683716 accordingly.
How I can limit quantity of deduced signs after a comma?
But if I save again value from DynamicForm I receive 2.2 again.
Also How I can see step not 1.0 but 1.00000000xxxxxxx in this case...
Code:
SpinnerItem spinner = new SpinnerItem();
spinner.setName("fieldName");
spinner.setDataPath("fieldName");
spinner.setMin(0.0);
spinner.setMax(50.0);
spinner.setStep(0.1f);
spinner.setDefaultValue(1.0f);
Code:
Float value = 2.2;
FormItem field = styleForm.getField("fieldName");
if (field != null) {
field.setValue(value);
}
If I click up or down i see 2.300000047683716 or
2.100000047683716 accordingly.
How I can limit quantity of deduced signs after a comma?
But if I save again value from DynamicForm I receive 2.2 again.
Also How I can see step not 1.0 but 1.00000000xxxxxxx in this case...
Comment