Android Question Progress bar-display the value after the decimal point

kisoft

Well-Known Member
Licensed User
Longtime User
Hi
I am using this example:
How to get the display of decimal values? I would like to use this to display the temperature.
 

klaus

Expert
Licensed User
Longtime User
In the CircularProgressBar.bas module, replace this line:
mLbl.Text = $"$1.0{Value}"$
by this line:
mLbl.Text = $"$1.1{Value}"$

In $1.1 the number before the decimal point means the numbers of characters before the decimal point. it adds leading zeros if needed.
and the number after the decimal point means the maximum numbers of characters after the decimal point
Make sure that when you set CircularProgressBar.Value = xxx, xxx is a Float or Double type variable.
 
Last edited:
Upvote 0

kisoft

Well-Known Member
Licensed User
Longtime User
Thanks, it works, but there is a small problem ... When the number is an integer it displays without a comma, e.g. 25 I would like it to display 25.0
 
Upvote 0
Top