ui.newLabel bounds

What are the 4 parameters in bounds? What does it mean the code below:
phoneLabel = ui.newLabel{bounds = { 30, 125, 50, 100 },text = “testing product”, font = “Helvetica”,textColor = { 240, 240, 240, 240 },size = 10,align = “center”}

I am trying to figure out if I can make the text below appear in 2 lines (instead of a large string) due size restrictions.
Thanks! [import]uid: 4883 topic_id: 970 reply_id: 300970[/import]

Its xpos, ypos, width and height. And to my knowledge, it is only a one line text field. [import]uid: 5712 topic_id: 970 reply_id: 2205[/import]

MikeHart is correct! ui.newLabel is a lightweight convenience function that places the single-line Corona text object within an imaginary bounding box, but does not clip the box or add other features. It basically does position math using the textfield.stageWidth/stageHeight – it’s useful for right-aligning fields in things like the Compass sample code.

If you want true multiline text with proper clipping and word-wrapping, etc., the best solution is to use the native multiline textfield object. [import]uid: 3007 topic_id: 970 reply_id: 2226[/import]

Evank, can you please point me to the multiline documentation?
thanks!
Alex [import]uid: 4883 topic_id: 970 reply_id: 2330[/import]

Sure – it’s on page 46 of the current APIReference.pdf, and here’s the relevant stuff:

native.newTextBox( left, top, width, height )

Creates a scrollable, multi-line text box
Properties:
• object.align can be a string “left”, “center”, or “right”.
• object.font is a font object returned by native.newFont().
• object.hasBackground is true when there is background and false when the background is transparent.
• object.size is the size of the text
• object.text is a string of the contents of the text box. Methods:
• object:setTextColor( r, g, b [, a] )
Note: Only available on device builds.
Native textboxes do not obey the display object hierarchy. For example, they always appear above normal display objects.


native.newFont( name [, size] )

Creates a font object that you can use to specify fonts in native text fields and text boxes. You can also pass it as a parameter to the display text objects in the display.newText() function.
The name parameter is a string that names the font. You can obtain an array of available fonts via native.getFontNames(). Alternatively, you can also pass the following constants instead of a string:
• native.systemFont
• native.systemFontBold
The size parameter is optional. You can use it to specify the point size of the font. By default, it will be the standard system font size of the device.
native.getFontNames()
Returns an array of the available native fonts. Note: On the simulator, the available fonts may not correspond to the actual available fonts on the device.
[import]uid: 3007 topic_id: 970 reply_id: 2335[/import]