Hi,
I’m not exactly new to Corona, but I came across a seemingly simple problem, the solution to which I cannot find. Thus I seek help in the Corona community.
The display.newText( ) can be created the simply way (with only x, y, and the message), or the more complex way (with a table of parameters). Today, I would like to talk about the latter.
Suppose we have a text object:
myText = display.newText { text = "My Very Very Long Text", x = 200, y = 200, width = 100, font = native.systemFont, fontSize = 20, align = "left" }
Now we can move the location of the text after creation by setting myText.x = 100
We can even change the font size of the after creation by setting myText.size = 30
My question is: is there any way to change the wrapping (and not literal) width of a text object AFTER creation?
I tried changing the “.width” property, but instead of changing the wrapping width of text object, I just cut off the message on both ends, which clearly is not my desired result.
I’ve attached a photo to better illustrate what I mean.
Any help is appreciated.
Thank you in advance!
KC