Copy link to clipboard
Copied
I've got a dynamic text box (txt_correct) into which I add text of varying lengths at runtime. It's set to multiline, but when the text is over a certain length, because it doesn't text wrap, the tail end of the text does not show. How do I get it to text wrap using JavaScript or from within Animate? Thanks
1 Correct answer
I found out what the problem was. I was keeping track of the problems users were doing and presenting them in the form 1,2,3, etc. I was doing it without spaces, so what I was putting in the box was treated as one word, which, of course, doesn't text wrap. Now I'm putting in spaces, 1, 2, 3 etc., and it wraps just fine.
Copy link to clipboard
Copied
On fixed-width dynamic textfields, text wraps and the textfield vertically expands automatically as needed. So since what you're describing is not normal behavior, we're going to need more detail.
Copy link to clipboard
Copied
I just added three dynamic text boxes and set the positions and size. Should I not set the vertical height? I add text on the fly.
root.txt_correct.text = "Correct: " + root.correctAnswers;
root.txt_incorrect.text = "Incorrect: " + root.incorrectAnswers;
root.txt_given_answers.text = "Given: " + root.givenAnswers;
Copy link to clipboard
Copied
I found out what the problem was. I was keeping track of the problems users were doing and presenting them in the form 1,2,3, etc. I was doing it without spaces, so what I was putting in the box was treated as one word, which, of course, doesn't text wrap. Now I'm putting in spaces, 1, 2, 3 etc., and it wraps just fine.

