ilan Expert Licensed User Longtime User Aug 27, 2024 #1 hi i noticed that in b4i (b4a works fine) if i put a fontawesome icon inside the string it does not show but outside it works. this code gives me this output: B4X: Copy Sub Button1_Click Label1.Text = "Congratulations, you won! " & Chr(0xF091) End Sub but this code does not show the icon: B4X: Copy Private Sub Button2_Click Label1.Text = $"Congratulations, you won! ${Chr(0xF091)}"$ End Sub for some reason the icon code is shown and not the icon itself. in b4a it works fine! Attachments strTest.zip strTest.zip 110.7 KB · Views: 262
hi i noticed that in b4i (b4a works fine) if i put a fontawesome icon inside the string it does not show but outside it works. this code gives me this output: B4X: Copy Sub Button1_Click Label1.Text = "Congratulations, you won! " & Chr(0xF091) End Sub but this code does not show the icon: B4X: Copy Private Sub Button2_Click Label1.Text = $"Congratulations, you won! ${Chr(0xF091)}"$ End Sub for some reason the icon code is shown and not the icon itself. in b4a it works fine!
Erel B4X founder Staff member Licensed User Longtime User Aug 27, 2024 #2 It is related to the way Chars are handled in B4i. This should work: Code: Copy Label1.Text = $"Congratulations, you won! ${"" & Chr(0xF091)}"$ Upvote 0
It is related to the way Chars are handled in B4i. This should work: Code: Copy Label1.Text = $"Congratulations, you won! ${"" & Chr(0xF091)}"$
ilan Expert Licensed User Longtime User Aug 27, 2024 #3 Erel said: It is related to the way Chars are handled in B4i. This should work: Code: Copy Label1.Text = $"Congratulations, you won! ${"" & Chr(0xF091)}"$ Click to expand... ok thanks for the explanation. but like this will it work on b4a too? if not i prefer this solution since it is for both platforms. B4X: Copy Label1.Text = "Congratulations, you won! " & Chr(0xF091) Upvote 0
Erel said: It is related to the way Chars are handled in B4i. This should work: Code: Copy Label1.Text = $"Congratulations, you won! ${"" & Chr(0xF091)}"$ Click to expand... ok thanks for the explanation. but like this will it work on b4a too? if not i prefer this solution since it is for both platforms. B4X: Copy Label1.Text = "Congratulations, you won! " & Chr(0xF091)
Erel B4X founder Staff member Licensed User Longtime User Aug 27, 2024 #4 ilan said: but like this will it work on b4a too? Click to expand... It will work. Upvote 0