# LibGDX Textfield - Text Overflow - Not Wrapping

In my app's registration screen, the textfield is not wrapping text as I expected. Notice in the above image, the email field is not containing the text. I have set the size of the textfield using setSize() method but I couldn't find any way to wrap text. Is there any solution to this?

I'm using LibGDX v1.9.0.

EDIT: I don't have problem with overflowing but I think it should be hidden beyond the textfield borders.

UPDATE: It was indeed carelessness from my part. I actually included a padding to the textfield position which I didn't correct when defining its size. Issue got solved now. I don't know whether I should keep the question or delete it.

## 1 Answer

The libGDX TextField is, according tho the API specification, a "A single-line text input field.".

That's why it's not wrapping the text.

• Okay but still the text should be behind the borders of the textfield, you know? How can I make it that possible? – WeirdElfB0y Apr 18 '16 at 10:00
• @BlackPanda Can you show more of your layout code? TextField will scroll the text inside its bounds if more text that can be showed is inputted so it looks like it's your layout that's the problem here. – bornander Apr 19 '16 at 14:25
• Here it is: pastebin.com/iVJVi8WS The text is indeed scrolling, but it is visible outside the bounds. – WeirdElfB0y Apr 20 '16 at 6:06
• Sorry for wasting your time, but it was indeed carelessness from my part. I actually included a padding to the textfield position which I didn't correct when defining its size. Issue got solved now. – WeirdElfB0y Apr 21 '16 at 7:40
• @BlackPanda Not a problem, glad you found the solution. – bornander Apr 21 '16 at 11:43