\n in Label and/or InputText?

Is the code \n for new line in Label and InputText still not working?

Is Multiline in Label implemented.

I cannot test both, because the output of new line does not work.
I tried to join texts with \n (alternatively with
) to manage a multiline output. But had no success!

Try this variant

Thank You,
but that does not really help. I cannot use a long empty string, because the legth of my text is not always the same.
I need the proper solution with /n (as in thunkable for android or Java amd Swift).

1 Like

Unfortunately \n still does not work. As an alternative to the Label I use html in the Web Viewer, but for Text Input this option is not suitable.

1 Like

“… because the legth of my text is not always the same”. Please excuse me, but could you give an example when the code below (the screenshot of which I made from my phone) does not work for you?

Sorry, it really work even in my app (a list constructed line by line).

,-) But it still is a workaround :slight_smile:

Hi there,

I seem to have found a way to use the line break character in the input fields and text fields. The idea is simple - you need to copy the invisible line feed from the multi-line input field.

https://x.thunkable.com/projects/5b0f9e15e407490001c395ee/project/properties/designer/

1 Like

This looks great, thanks @actech.

So in this case, for TextInput1 the multiline property is is set to true?

Are you doing anything else on the UI side to hide the text input then?

Yes, TextInput1.Multiline = true

No, nothing is hidden. We get a newline character once, and then you can remove the LocalStorage.Save block and the InputText component from the project, as they are no longer needed.

You can do <br> on a label to go to the next line.

Please show an example of this in Thunkable X.

Will show later…

Thanks for this, I found a way to do it via the Air Table spreadsheet.
this way could also probably be done using a text box with “multiple line = true” and “editable = false”…
but i dont want a text box visible on my screen for aesthetic purposes! You can the use the “value” from this procedure multiple times to break other text pieces, in lists as well…!!

see Pics attached.

!

2 Likes

There is a new block. in the text block bucket.
scroll completely down

In Thunkable X use a LBL and \n works without any issues. Text box does not interpret \n as LF


I am using this block to trace execution. I get a perfect line by line execution trace
image
Thanks to Tatiang who gave me this idea

I’m glad it’s working for you! But there’s no need to reply to a topic that is 2 years old.

2 Likes

The reason I replied was getting \n to work took me a lot of time and experiment. It just worked for Label and for some strange reason never worked for Text boxes, supporting multiple lines did not help. Google could not get me the answer. So I thought anyone like me in the current times might benefit from my work.

2 Likes