Hi Isomporhic,
I am having some trouble with the slider. It seems when I set the rangeFormat to a decimal format with a percent, the slider will occasionally display values with excessive decimal points. For example this slider is showing me 111.00000000001%, when I try to set it to 111.0%. It's also showing me 114.999999999999% instead of 115.0%. But other numbers are fine. It's just a few numbers that get displayed with the excessive decimal places. I played around with setRoundValues() and setRoundPrecision(), but it not seem to have an affect. Also it appears it only happens when the rangeFormat involves a %.
Thanks
I am having some trouble with the slider. It seems when I set the rangeFormat to a decimal format with a percent, the slider will occasionally display values with excessive decimal points. For example this slider is showing me 111.00000000001%, when I try to set it to 111.0%. It's also showing me 114.999999999999% instead of 115.0%. But other numbers are fine. It's just a few numbers that get displayed with the excessive decimal places. I played around with setRoundValues() and setRoundPrecision(), but it not seem to have an affect. Also it appears it only happens when the rangeFormat involves a %.
Code:
Slider slider = new Slider(); slider.setMinValue(0); slider.setMaxValue(3.0); slider.setNumValues(300); slider.setRangeFormat("0.0#%"); slider.setValueFormat("0.0#%");
Thanks
Comment