tufanv Expert Licensed User Longtime User Dec 30, 2020 #1 Hello, is it possible to size some part of the label with size 13 and other part with size 16 for example ? Thanks
Hello, is it possible to size some part of the label with size 13 and other part with size 16 for example ? Thanks
tufanv Expert Licensed User Longtime User Dec 30, 2020 #2 Missed the richstring library. It seems that, it can achieve what I want. Upvote 0
roumei Active Member Licensed User Dec 30, 2020 #3 You can use CSBuilder with the .Size property: B4X: Dim cs As CSBuilder cs.Initialize.Alignment("ALIGN_LEFT") Dim tfSize As Float = Label1.TextSize cs.Typeface(Typeface.DEFAULT).Size(tfSize).Append("Label").Size(tfSize * 0.7).Append(" Text").PopAll Label1.Text = cs Result: Upvote 0
You can use CSBuilder with the .Size property: B4X: Dim cs As CSBuilder cs.Initialize.Alignment("ALIGN_LEFT") Dim tfSize As Float = Label1.TextSize cs.Typeface(Typeface.DEFAULT).Size(tfSize).Append("Label").Size(tfSize * 0.7).Append(" Text").PopAll Label1.Text = cs Result:
asales Expert Licensed User Longtime User Dec 30, 2020 #4 B4X: Dim cs As CSBuilder cs.Initialize.Size(13).Append("Text One").Pop.Size(16).Append("Text Two").PopAll Label1.Text = cs Upvote 0
B4X: Dim cs As CSBuilder cs.Initialize.Size(13).Append("Text One").Pop.Size(16).Append("Text Two").PopAll Label1.Text = cs
Erel B4X founder Staff member Licensed User Longtime User Dec 30, 2020 #5 The other, cross platform, option is BBLabel. Upvote 0