Android Question Resize label with contained text

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
Hi to All.
Is it possible to resize a label to be as long as the text that contains?
Thanks in advance
 

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
I know that there exist something as you suggest. I need the opposite: to fix the label and draw a line under it, but only for the length of the text contained. I cannot change the size of the font. Actually, what I need is something like an "hyperlink", that is an "underlined" text. I didn't find anything of this type in available views. So I decided to do something similar to it using a label, with a text inside, and a canvas drawing a line under it. (By the way, I don't know whether I miss something, but there is no underlined font available). The line must be as long as the text and not as the label. Thanks.
 
Upvote 0

MitchBu

Well-Known Member
Licensed User
Longtime User
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Another option:
B4X:
Dim rs As RichString
rs.Initialize("this is the text")
rs.Underscore(0, rs.Length)
Label1.Text = rs

SS-2016-12-15_08.13.07.png
 
Upvote 0
Top