Highlighted

Text wrap for dynamic text box for Animate HTML5 (Canvas) app

Explorer ,
Apr 18, 2019

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

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.

Views

450

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Text wrap for dynamic text box for Animate HTML5 (Canvas) app

Explorer ,
Apr 18, 2019

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

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.

Views

451

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 18, 2019 0
Adobe Community Professional ,
Apr 18, 2019

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 18, 2019 1
Explorer ,
Apr 18, 2019

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;

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 18, 2019 0
Explorer ,
Apr 23, 2019

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 23, 2019 0