3.5.1 Text Property

You can access the contents of a Text or TextBox element through the 'text' property. To change the contents, simply assign a new value.

Text1.text = CALC.today(); // display current date/time

A TextBox element has several properties in addition to those of the Text element. The 'alignment' property controls the alignment of the TextBox within the document flow. The 'textAlignment' property controls the alignment of the text within the TextBox boundaries.

// right align on the page

alignment = StyleConstant.H_RIGHT;

 

// center align text inside textbox

textAlignment = StyleConstant.H_CENTER;

See Also

textAlignment, for more information on the property.

Alignment Property, for more information on setting alignments.

<< 3.5 Text and TextBox © 1996-2013 InetSoft Technology Corporation (v11.4) 3.5.2 Useful Text/String Functions >>