widget.newButton and labelAlign does not work when condition is textOnly

Hi guys,

I created a widget.newButton() and its properties is set to ‘textOnly = true’ and 'labelAlign = ‘right’.

I notice that the ‘labelAlign’ property does not work when the ‘textOnly = true’. It is always aligned to the ‘left’.

This is not mention in the document at all ( http://docs.coronalabs.com/api/library/widget/newButton.html ), and I would like the ‘labelAlign’ to work in this situation.

Would appreciate if someone updates the documents, or fix this (if it is a bug).

Thanks

Hi @yosu,

This is by design. Since there are no visual background elements to a text-only button, there isn’t anything to “align” the label with.

If your needs are to align several buttons “right” (like in a column), you can read the width of them and then position them right along the according axis.

Best regards,

Brent

Hi @yosu,

This is by design. Since there are no visual background elements to a text-only button, there isn’t anything to “align” the label with.

If your needs are to align several buttons “right” (like in a column), you can read the width of them and then position them right along the according axis.

Best regards,

Brent