display.newText aligns at the bottom, but only when it has multiple lines...

Hi,

I am encountering an issue and cant figure out where it is coming from.

I have this display.newText:

 local descriptionText = display.newText( { parent = refreshableDescriptionGroup, text = item.description, width = descriptionContainer.width - 6, height = 44, font = fileConstants.DEFAULT\_FONT, fontSize = 11 })

This alligns at the bottom of the textArea, but only when multiple lines are shown, single lines are correctly alligned at the top. What could cause this??

Hi @pouwelsjochem8,

It may be something related to how setting the “height” actually crops the text area. Instead, try setting it to 0 or omitting that property entirely (but keep the “width” parameter so that the text wraps when the content exceeds the width of the area).

For your reference also:

https://docs.coronalabs.com/api/library/display/newText.html

Brent

Apparently it’s a OSX El Capitan (10.11) beta bug… as my windows laptop doesn’t have this problem.

So will wait for full release of the new OSX.

Hi @pouwelsjochem8,

It may be something related to how setting the “height” actually crops the text area. Instead, try setting it to 0 or omitting that property entirely (but keep the “width” parameter so that the text wraps when the content exceeds the width of the area).

For your reference also:

https://docs.coronalabs.com/api/library/display/newText.html

Brent

Apparently it’s a OSX El Capitan (10.11) beta bug… as my windows laptop doesn’t have this problem.

So will wait for full release of the new OSX.