Height of Multiline Text

Hey,

I'm trying to stick an image underneath some text generated using the new multiline text function. The text can be variable height, so I'm hoping to get some sort of size from the multiline text object, but failing.

Any ideas?

Thanks,

Corona SDK 638
iOS/Mac: multiline text and support for newline character in display.newText( string, x, y, [w, h,] font, size ). You must supply the optional w,h params to enable multiline behavior; otherwise it reverts to single line. The w,h define the box in which the text is rendered.

Corona SDK 640
iOS/Mac: for multiline text, display.newText() now supports variable height, the width must be supplied and height must be 0.

Try to set height to 0, and check if the height changes, depending on how long your text is. I didn't test it.

I believe the OP is setting the height of the box to 0 to get a variable height text field, but needs to know the final size.

Have you checked the value of .contentHeight?

print(myTextString.contentHeight)

views:2831 update:2011/11/5 17:18:39
corona forums © 2003-2011