rezaali / ofxUI

[DEPRECATED] UI Addon for openFrameworks
http://www.syedrezaali.com/#/ofxui-project-showcase/
518 stars 202 forks source link

ofxUITextInput setTextString not displaying text correctly #220

Open pusnik opened 10 years ago

pusnik commented 10 years ago

If you want to insert text(setTextString) that does not fit into ofxUITextInput it gets cut. Not whole text is inserted - only the visible part. If you write text inside by yourself (with keyboard) ofxUITextInput works great. Even if there is to much text to be fitted inside you can slide with cursor to see it all.

The problem is in ofxUITextInput.cpp, from line 405:

      if(newWidth < rect->getWidth()-padding*2.0)

If you comment that out and add recalculateDisplayString(); at the end of the function, it works as it should.