iOS Question Newline in label text

mrossen

Active Member
Licensed User
Longtime User
Hi,

This maybe a silly question but I can not get at line break in label text to work.

In B4A i read a text line from a file. The line could look like this : "Test\nNew test"

This works perfect in B4A but not in B4I.

I have made a test directy at the label text

If I use label.text = "Test" & chr(10) & "New test" it works.

But how do I do this from one text linie from a text file ?

Mogens
 

BillMeyer

Well-Known Member
Licensed User
Longtime User
Hi There,

In your designer, make sure that "MultiLine" is selected:
1578046259898.png


Then your code must look like this:
B4X:
"Test" & CRLF & "New test"

And that should do the trick !!
 
Upvote 0

mrossen

Active Member
Licensed User
Longtime User
Hi there,

Yes, I have tried that and it works perfect.

But I get the text from at textfile like this : Test\nNew test
 
Upvote 0
Top