Android Question AutoTextSizeLabel Class Question

Azhar

Active Member
Licensed User
Longtime User
Hello, how can I get this class type to 'word wrap' around the autoTextSizeLabel custom type giving the largest text size to fit in and fill the entire control?

Currently, if I set the autotextsizelabel1.text to = "a very loooong piece of text of about 40 characters in length", the actual result will be the largest text size possible to fit the string across the width of the custom Label type in one row - it won't word wrap and of course the text size will be minuscule.

But if I enter the same text within the Text parameter within Designer and do it across multiple rows, I will get the word wrapping result I need with the largest text size etc.

Maybe this class didn't address the problem of word wrapping so is there another custom type that I can use to fulfill the purpose to do this?

Kind regards,

Azhar
 
Last edited:

Azhar

Active Member
Licensed User
Longtime User
You can change this line:
B4X:
Dim multipleLines As Boolean = mLbl.Text.Contains(CRLF)
To:
B4X:
Dim multipleLines As Boolean = True
I'm not 100% that it will do what you want but please try it.

Thank you Erel. It works very well indeed. That saves me a lot of messing around.
 
Upvote 0
Top