RonenNess / GeonBit.UI

UI system for MonoGame projects.
MIT License
478 stars 64 forks source link

Single line TextInput text oveflow #88

Closed Babelz closed 6 years ago

Babelz commented 6 years ago

Hello,

Is it possible to clip the overflowing text in TextInput entity with some built-in functionality? I have tried doing this my self but had no luck getting it to work. I am using version 3.2 of GeonBit.UI. In older versions of GeonBit.UI the TextInput entity has a OverFlow property but it did not work, using this property caused an exception to be thrown because the render target size was not valid.

image

Thanks for any help in advance.

RonenNess commented 6 years ago

Hi @Babelz ,

The Overflow property from older versions was more of an undesired / unnoticed leftover from the Panel class, never really tested if it works (guess it didn't).

Currently overflow is not supported for TextInput, however, you can use LimitBySize to prevent user from overflowing text out of boundaries (this will limit text length).

Hope this helps :)