Im in a big hurry! The align parameter doesn't work on this code?

txtEventtittel[i] = display.newText("", 0, 0, 200, 0, "Helvetica Neue Bold", 18) txtEventtittel[i].x = display.contentWidth\*0.5 txtEventtittel[i].y = bgEvent[i].y + 120 txtEventtittel[i].anchorY = 0 txtEventtittel[i].align = "center" txtEventtittel[i].text = event.results[i].navn txtEventtittel[i]:setFillColor(0, 0, 0) eventsGroup:insert( txtEventtittel[i] )

the text aligns to the left no matter what?

Try this approach. It works well. 

local options = { --parent = textGroup, text = "Hello World", x = 100, y = 200, width = 128, --required for multi-line and alignment font = native.systemFontBold, fontSize = 18, align = "right" --new alignment parameter } local myText = display.newText( options ) myText:setFillColor( 1, 0, 0 )

whats the params for colour? thanks btw it worked

Use myText:setFillColor( 1, 0, 0 ) to set text color. More info on this API can be found at : 

https://docs.coronalabs.com/api/type/ShapeObject/setFillColor.html

Thats where the example above came from as well. Good luck with your project.

thank you :slight_smile:

You are most welcome. 

Try this approach. It works well. 

local options = { --parent = textGroup, text = "Hello World", x = 100, y = 200, width = 128, --required for multi-line and alignment font = native.systemFontBold, fontSize = 18, align = "right" --new alignment parameter } local myText = display.newText( options ) myText:setFillColor( 1, 0, 0 )

whats the params for colour? thanks btw it worked

Use myText:setFillColor( 1, 0, 0 ) to set text color. More info on this API can be found at : 

https://docs.coronalabs.com/api/type/ShapeObject/setFillColor.html

Thats where the example above came from as well. Good luck with your project.

thank you :slight_smile:

You are most welcome.