How to set Text Input to text wrap

I’m creating a text input in a Form where sometimes the input will get too long.
How can I set the text input to wrap?

Are you using a “Text Field” or a “Text Area”?

When you use a text area, there’s a “Line Wrap” option, under the “Behaviour” category. That should do exactly what you want.

be sure to make the text area large enough to get a decent scrollbar (at least 3 lines to give room to both arrow buttons and a small scroll bar itself).

Also note that you can set the default number of rows and columns of the text area. If this default number is bigger than the actual size of the text area, scrollbars will always be shown. If you want to hide scrollbars by default, you may need to make this number smaller.

1 Like

Ignition really should add Line Wrap to the Text Field component though.
You can wrap your text in "<HTML></HTML>" which will give you line wrapping functionality. Its very irritating to do this for everything though.I guess we could always create our own template, but it seems like something that should be inherently supported.

The entire point of the Text Area component is to add support for multiple lines. The Swing Text Field component (JTextField) expressly states:

JTextField is a lightweight component that allows the editing of a single line of text.

1 Like

Thanks for your reply.
I want to use Text Field so the scroll bar won’t show up.

Since it seems that I can’t do it in Text Field, I have used Text Area instead, and set the rows to 2 so the scroll bar won’t show up.

Have you tried placing just a < html > (minus the spaces) tag in front of the text that appears in the field? I have used that before when I wanted to make text wrap.

Example: < html >This is the text in my text field

1 Like

what do you mean @casey.myers,
I want to use this for text input for a Form to be submitted and written in a database.
do you mean every time they key in something they need to type ?
where should I put the ?