mrossen Active Member Licensed User Longtime User Jan 3, 2020 #1 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
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 Jan 3, 2020 #2 Hi There, In your designer, make sure that "MultiLine" is selected: Then your code must look like this: B4X: "Test" & CRLF & "New test" And that should do the trick !! Upvote 0
Hi There, In your designer, make sure that "MultiLine" is selected: Then your code must look like this: B4X: "Test" & CRLF & "New test" And that should do the trick !!
mrossen Active Member Licensed User Longtime User Jan 3, 2020 #3 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
Hi there, Yes, I have tried that and it works perfect. But I get the text from at textfile like this : Test\nNew test
E emexes Expert Licensed User Longtime User Jan 3, 2020 #4 How about... Last edited: Jan 3, 2020 Upvote 0
mrossen Active Member Licensed User Longtime User Jan 3, 2020 #5 Hi emexes, Thank you. This works perfect Mogens Upvote 0
E emexes Expert Licensed User Longtime User Jan 3, 2020 #6 I think .Replace is my favourite function. Surprised I haven't worn it out. Upvote 0