A Arturs Member Licensed User Longtime User Sep 29, 2015 #1 Hi I have the following code: Sub SeekBar1_ValueChanged (Value As Int, UserChanged As Boolean) result.Text = ((Value+400)/100) End Sub In the label I have result 4.1 ; 4.11 ; 4.12 so It is OK but I need to display 4.10 instead of 4.1. How to do it ? Regards Artur
Hi I have the following code: Sub SeekBar1_ValueChanged (Value As Int, UserChanged As Boolean) result.Text = ((Value+400)/100) End Sub In the label I have result 4.1 ; 4.11 ; 4.12 so It is OK but I need to display 4.10 instead of 4.1. How to do it ? Regards Artur
Erel B4X founder Staff member Licensed User Longtime User Sep 30, 2015 #2 B4X: result.Text = $"$1.2{((Value+400)/100)}"$ [B4X] Smart String Literal Upvote 0
A Arturs Member Licensed User Longtime User Sep 30, 2015 #3 I do not know why but It still does not work Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Oct 1, 2015 #4 Which version or B4A are you using? What is the result? Upvote 0
A Arturs Member Licensed User Longtime User Oct 1, 2015 #5 I use B4A 5.20 trial version. Result is the same 4.1 ; 4.11 ; 4.12 instead of 4.10 ; 4,11 ; 4,12. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Oct 1, 2015 #6 My mistake. $1.2 means that there are at most 2 fraction digits. You need to use NumberFormat2: B4X: Log(NumberFormat2((10+400)/100, 1, 2, 2, False)) Upvote 0
My mistake. $1.2 means that there are at most 2 fraction digits. You need to use NumberFormat2: B4X: Log(NumberFormat2((10+400)/100, 1, 2, 2, False))
A Arturs Member Licensed User Longtime User Oct 1, 2015 #7 It works Why 50 is the maximum size of text in the label 50 I need much bigger characters. I would like to display text 1.00 but size should be at least 100. Upvote 0
It works Why 50 is the maximum size of text in the label 50 I need much bigger characters. I would like to display text 1.00 but size should be at least 100.
J James Chamblin Active Member Licensed User Longtime User Oct 1, 2015 #8 50 is the maximum for the designer. Once the layout is loaded in the app, you can change the size by using Result.TextSize = 100 Upvote 0
50 is the maximum for the designer. Once the layout is loaded in the app, you can change the size by using Result.TextSize = 100
Erel B4X founder Staff member Licensed User Longtime User Oct 2, 2015 #9 Note that you can also change it in the designer script. The size limit will be increased in the next version. Upvote 0
Note that you can also change it in the designer script. The size limit will be increased in the next version.