Text Component Properties

These properties affect the text component.

For a guide to using the text component, see Text.

Text components are also affected by Common Properties.

Text and Font properties
The Text and Font properties in the Property Inspector

Text

Text

Text
Sets or reflects the string that appears in this text component.

The Text property
The Text property

Multiline

Multiline

Multiline
Specifies whether this text component has multiline capability. Press Alt + Enter to insert a line break.

TRUE
Line breaks are recognized.

FALSE
Line breaks are ignored. All text is displayed on a single line.

The Multiline property
The Multiline property

Editable

Editable

Editable
Specifies whether the user can edit the text in this component at runtime by clicking on it.

The Editable property
The Editable property

Word Wrap

Word Wrap

Word Wrap
Specifies whether overflow text wraps. Multiline text must be enabled for this property to take effect.

The Word Wrap property
The Word Wrap property

Font

Font

Font
Specifies the font for this element. You can add a new font, and then specify it using the drop-down menu for this property.

To add a new font to your project and use it for this property:

  1. If you have not already done so, right-click the root folder for your project, and add a new folder named fonts.
  2. Navigate to the font file on your computer and drag it to the fonts folder.
  3. Save your work and refresh the browser.
  4. Specify the font using the drop-down menu for this property.

The Font property
The Font property

Font Color

Font Color

Font Color
Defines the font color for this element.

The Font Color property
The Font Color property

Font Size

Font Size

Font Size
Defines the font size for this element. If the font size is set to Auto, the text scales to occupy the size of the component.

Note

When Font Size is Auto, the font size automatically updates when the text component size changes, but only if the text component width and height are pixel values. To force the font size to update, you can invoke the measureText property in the Advanced Properties panel.

If the text component size is Auto or a percentage of the text component's parent size, you might want to bind the the parent's onResize Advanced property to the text component's measureText Advanced property to ensure that the font size updates when the parent size changes.

The Font Size property
The Font Size property

Italic

Italic

Italic
Specifies whether text in this element is italicized.

The Italic property
The Italic property

Bold

Bold

Bold
Specifies whether text in this element is bold.

The Bold property
The Bold property

Underline

Underline

Underline
Specifies whether text in this element is underlined.

The Underline property
The Underline property

Horizontal Alignment

Horizontal Alignment

Horizontal Alignment
Specifies whether the content in this component is left-justified, centered, or right-justified.

The Horizontal Alignment property
The Horizontal Alignment property

Vertical Alignment

Vertical Alignment

Vertical Alignment
Specifies whether the content in this component is positioned at the top, middle, or bottom of the container.

The Vertical Alignment property
The Vertical Alignment property

Left Padding

Left Padding

Left Padding
Defines a number of pixels of space between the left container boundary and the leftmost edge of the content. Negative numbers are not allowed.

Paddings are part of an object's width and height. See Borders, Padding, and Content Size.

The Left Padding property
The Left Padding property

Right Padding

Right Padding

Right Padding
Defines a number of pixels of space between the right container boundary and the rightmost edge of the content. Negative numbers are not allowed.

Paddings are part of an object's width and height. See Borders, Padding, and Content Size.

The Right Padding property
The Right Padding property

Top Padding

Top Padding

Top Padding
Defines a number of pixels of space between the top container boundary and the topmost edge of the content. Negative numbers are not allowed.

Paddings are part of an object's width and height. See Borders, Padding, and Content Size.

The Top Padding property
The Top Padding property

Bottom Padding

Bottom Padding

Bottom Padding
Defines a number of pixels of space between the bottom container boundary and the bottommost edge of the content. Negative numbers are not allowed.

Paddings are part of an object's width and height. See Borders, Padding, and Content Size.

The Bottom Padding property
The Bottom Padding property

Link Paddings

Link Paddings

Link Paddings
Links all four padding editors so that their values are equal.

The Link Paddings property
The Link Paddings property

Text Direction

Text Direction

Text Direction
Specifies the direction for text and input in this component, to support the use of right-to-left languages.

Left to right
The text or user input direction is left to right.

Right to left
The text or user input direction is right to left.

Auto
The direction of user input is automatically detected as the user enters text.

The Text Direction property
The Text Direction property

Max Font Size

Max Font Size

Max Font Size
Defines the maximum font size for this text component. This property is only applicable when text size is set to Auto.

The Max Font Size property
The Max Font Size property

Min Font Size

Min Font Size

Min Font Size
Defines the minimum font size for this text component. This property is only applicable when text size is set to Auto.

The Min Font Size property
The Min Font Size property

Max Char Length

Max Char Length

Max Char Length
Specifies the maximum number of characters allowed in this text component.

The Max Char Length property
The Max Char Length property

Clip Content

Clip Content

Clip Content
Defines the handling of text that overflows this text component.

TRUE
All overflowed text is clipped and is not visible.

FALSE
All overflowed text is visible and responds to mouse events.

The Clip Content property
The Clip Content property

Is HTML

Is HTML

Is HTML
Specifies whether the string in this text component is rendered as HTML. For security, does not not parse advanced HTML tags such as hyperlinks. Only works if Editable is set to FALSE, Horizontal Alignment is set to Left, and Vertical Alignment is set to Top. Hard line breaks added by pressing Alt + Enter are not rendered.

The Is HTML property
The Is HTML property

Is Advanced HTML

Is Advanced HTML

Is Advanced HTML
Renders the text as HTML, including links, forms, images and marquees. Links must be preceded with "http:" or "https:". Only works if Editable is set to FALSE, Horizontal Alignment is set to Left, and Vertical Alignment is set to Top. Hard line breaks added by pressing Alt + Enter are not rendered.

The Is Advanced HTML property
The Is Advanced HTML property

Character Spacing

Character Spacing

Character Spacing
Specifies the horizontal spacing between characters. If null, the default spacing for the selected font is used.

The Character Spacing property
The Character Spacing property

Line Spacing

Line Spacing

Line Spacing
Specifies the vertical spacing between lines. If 0, the default spacing for the selected font is used.

The Line Spacing property
The Line Spacing property