Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Word wrapping paradox

ANSWERED

I have an issue that I have not found a simple solution for. Wanted to run it by all of you to try to get some clarity. 

 

On my index.gui file I have some text inputs:

<text id="text1" x="10" y="215">Text 1</text> 

<text id="text2" x="10" y="260">Text 2 is what I am calling this text input:</text>  

<text id="text3" x="10" y="270">Text 3</text> 

 

When run, text2 runs off the page and I want the text to wrap to the next line. The solution I am working with is replacing the text input with a textarea. This wraps the text to the next line but it also covers the text3 text. 

 

One potential solution is to do an if/then statement that if the character count of the textarea is >17 then to change text3 to y=280.

 

This solution works to a certain point because there could be as many as 20 textareas in the gui. As you can imagine doing the if/then for each one would mean I would have to account for if each one has text and how long they are. 

 

There HAS to be a better way to do this. Does anyone have any suggestions/best practices around this?

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Try use some dynamic textareas with $ based positioning. The position of each element should be updated automatically when the content of textarea is changed.

View best answer in original post

Best Answer
0 Votes
1 REPLY 1

Try use some dynamic textareas with $ based positioning. The position of each element should be updated automatically when the content of textarea is changed.

Best Answer
0 Votes