GxTitle.TextAlignment

Syntax

TextAlignment: String

Description

The TextAlignment property determines horizontal alignment of title text.

Comments

Available values:

Value

Brief description

Left

Align to the left from center.

Right

Align to the right from center.

Use JSON or the setTextAlignment method to set the property value, and the getTextAlignment method to get the property value.

Example

To execute the example, the HTML page must contain the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component). To show the title, click the Title button on the Home tab. Align title to the right:

// Get title
var title = expressBox.getDataView().getTitleView();
// Align title to the right
title.setTextAlignment("right");

As a result the title is aligned to the right:

See also:

GxTitle