Text wrap in textbox

The text in Native.newTextBox will not wrap but according to the API it says it will. Is there something that can be done to make this work?

Snippet from API

Gotchas

Use “\n” to start text on a new line. Text will automatically wrap to the next line if it’s too long

Simulator or device?

What OS, version of the OS, and test device(s) are you seeing this problem on?

Simulator on Mac OSX 10.11.5.

Simulator Version 2016.2906 (2016.6.21)

Are you typing the \n into the box or are you using the \n inside of a string to pre-populate the box?

Rob

I tried both just to figure out how it works since the API said it could but neither attempt did it. What I need is the ability to type in a box with auto wrap as users are using the app. Is this possible?

I found a reference to a code sample in the forums but the link was dead and the forum post had minimum info. It was also an archived post so I started this one since couldn’t continue that one.

If you have the field active and you are typing into the field, a \ and n are just characters and will be part of the captured string. In this case, you just press the “enter” key on the keyboard to go to a new line.

If you look a the “NativeDisplayObjects” sample app in /Applications/CoronaSDK/SampleCode/Interface/NativeDisplayObjects you will see that the sample includes populating the field with newlines. It looks like it’s working as it should in my simulator.

Rob

Simulator or device?

What OS, version of the OS, and test device(s) are you seeing this problem on?

Simulator on Mac OSX 10.11.5.

Simulator Version 2016.2906 (2016.6.21)

Are you typing the \n into the box or are you using the \n inside of a string to pre-populate the box?

Rob

I tried both just to figure out how it works since the API said it could but neither attempt did it. What I need is the ability to type in a box with auto wrap as users are using the app. Is this possible?

I found a reference to a code sample in the forums but the link was dead and the forum post had minimum info. It was also an archived post so I started this one since couldn’t continue that one.

If you have the field active and you are typing into the field, a \ and n are just characters and will be part of the captured string. In this case, you just press the “enter” key on the keyboard to go to a new line.

If you look a the “NativeDisplayObjects” sample app in /Applications/CoronaSDK/SampleCode/Interface/NativeDisplayObjects you will see that the sample includes populating the field with newlines. It looks like it’s working as it should in my simulator.

Rob