Text aligment within the Label
is it possible to justify text to the left-right sides - sililar for example like in CSS: text-align:justify ?
5 Answers
-
textAlign:'center'
-
Have you found something to justify text in a Label ?
I am searching for something to justify text too.Thanks
-
Still no way to justify text in a label?
-
Depends on why you want to do this. By default labels center their text on whatever view they are put on. It's only once you position the label say, 20 from the left, that the text is then aligned left. If say, you wanted to align the text on an image that itself was 20 from the left, here's what you could do:
set a second view under your image with the same width and at the same distance from the left, center or right
add the label to the second view and do not set its distance from left, right or center.
The label should now appear centered on the image.
-
textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER