Phone API Reference - UI Classes (Widgets) - Text - align
align
Description
Controls the placement of the text display.
Basic Example:Â
textObj.align(alignment_constant); |
Parameters
Name | Required | Type | Default | Description |
---|---|---|---|---|
alignment_constant | Yes | string | Â | Alignment constant. Use one or more separated by the "|" character of the following:
|
Examples
align a text widget at center top
var textObj = new Text(0, 0, 100, Text.LINE_HEIGHT, 'Test Text');
textObj.align(Widget.CENTER | Widget.TOP); |
Â