Textfield

When using a fixed sized GUI/GUILayout TextField that wraps, the text is not “followed” after reaching the end of the fixed width.

str = GUILayout.TextField(str, 200);

Now limit the fixed width of a TextField, run and type in it. when it reaches the end, it will start to act weird ie. draw text before the field, not draw text that is written after reaching max width.

Any quick fixes?

Thoughts I have are:
1: limit nr of chars. not okay for people with long emails.
2: make the width of the TextField accommodate any thinkable size. not that pretty
3: Idea?

can you ad screenshots in order to check what is happening? :slight_smile:

first thing tomorrow morning when I’m back at work :slight_smile:
thou it’s quite easy to replicate.

here are some screenshots, blurred the rest of my scene for anonymity.

screen 1: Every thing is okay.
text contains:paulusul@gmail.com hel

screen 2: The text gets offset to the left, ouch!
text contains:paulusul@gmail.com hello

screen 3: All the text following the n character is not shown.
text contains:paulusul@gmail.com hello now you cant see the text

hope some one can help :slight_smile: can’t believe no ones tried this…

[Edit]changed order of screenshots.



I understand you :smile:

well, that’s how the text field is supposed to behave :stuck_out_tongue:

but you can change the configuration of it adding parameters to it (making it bigger/etc)

hope it helps :smile: