x


Text doesn't fit (too much to write) in TextField/TextArea and it doesn't automatically wrap. Solution

Text field which isn't that long (on the X axis) but it's deep (on Y axis). I use it to display Arrays lists. Some arrays have longer elements, some smaller.

The point is to force word wrap in the textfield/area so that the text inside it doesn't get hidden by an edge and everything is visible.

Any sugestions?

more ▼

asked Sep 08 '10 at 12:27 AM

seth gravatar image

seth
21 3 6 10

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Use a GUIStyle which has wordWrap set:

http://unity3d.com/support/documentation/ScriptReference/GUIStyle-wordWrap.html

Alternatively, change the main skin to do it:

GUI.skin.textArea.wordWrap = true;
more ▼

answered Sep 08 '10 at 02:31 AM

Mike 3 gravatar image

Mike 3
30.5k 10 65 252

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x550
x21

asked: Sep 08 '10 at 12:27 AM

Seen: 1789 times

Last Updated: Sep 08 '10 at 12:27 AM