Here is a way to split long text in multiple lines by providing limiting width of text (again as usually something I needed for my app). It's compatible with existing TextField object's methods (except initializing is different), and you can set bunch of additional stuff, like, line spacing, alignment, etc.
No dependencies for this one, so here's
object's codeExample usage:
local text = TextWrap.new(str, 250, "justify")
text:setLineSpacing(5)
text:setPosition(10,10)
text:setTextColor(0xff0000)
stage:addChild(text) |
And as usually, more info, sample project and video demo here:
http://appcodingeasy.com/Gideros-Mobile/Creating-multi-line-text-fields-in-Gideros-MobileFeel free to use in your projects
Comments
i tried the following but it only makes one line break, not two