Aligning text in a tableview object

I have a tableview object that contains two columns. The first column is text that varys in length. I am trying to get the text in the column to left align. I tried using the align attribute in the newText function but it ignored the attribute.

Current Tableview

     Some text         2

Some more text     3

Desired Result

Some text              2

Some more text     3

        local rowTitle = display.newText(passdata[idx].textfield1,0, 0, “Helvetica”, 40)
        rowTitle.x = rowCenterX
        rowTitle.y = rowCenterY
        rowTitle:setFillColor(0,0,0)-- 14/255, 164/255)
        rowGroup:insert(rowTitle)

Thanks for any suggestions

Any suggestions? Thanks

When using newText, you need to specify a width before text alignment will work. See the documentation: http://docs.coronalabs.com/api/library/display/newText.html

Instead of having 2 text objects for each row, you can also experiment with string.format() and whitespaces to align the text. See https://coronalabs.com/blog/2015/02/17/tutorial-formatting-values-using-string-format/

Any suggestions? Thanks

When using newText, you need to specify a width before text alignment will work. See the documentation: http://docs.coronalabs.com/api/library/display/newText.html

Instead of having 2 text objects for each row, you can also experiment with string.format() and whitespaces to align the text. See https://coronalabs.com/blog/2015/02/17/tutorial-formatting-values-using-string-format/