Developers Manual > Cocos Studio > UI Editor > UI Widget > UI Widget UITextArea

UI Widget UITextArea



The UITextArea subclass implements the text area of the touch screen. The UITextArea subclass is a subclass of the UIWidget.
The widget provides methods to set the text area of the display’s width and height, font size, font, alignment, text content, whether scaling applies, and other attributes.

3x3 grids

For more information, see 3x3 grids.

Common properties

For more information, see Common properties.



Sets the widget’s display width.


Sets the widget’s display height.

Font size

Displays font size.


Supports only Arial, bold, and Microsoft Yahei.

Align horizontal

Sets the horizontal alignment of the widget:
# HT_Left: Aligns text to the left.
# HT_Center: Aligns text to the center.
# HT_Right: Aligns text to the right.

Align vertical

Sets the vertical alignment of the widget:
# VT_Top: Aligns text to the top.
# VT_Center: Aligns text to the center.
# VT_Bottom: Aligns text to the bottom.


Displays content of the text.

Text scale

Controls whether the text is scaled.

3-3-12-img-01.png (4.3 kB), 2013-12-03 07:43

3-3-12-img-02.png (11.2 kB), 2013-12-03 07:43

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.