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

UI Widget UITextButton



The UITextButton subclass implements the button for the touch screen. The UITextButton subclass is a subclass of the UIWidget.
The widget provides methods to set the text area for 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.


Normal state

Sets a picture (png, jpg) to display on normal status.

Press state

Sets a picture (png, jpg) to display on pressed-down status.

Disabled state

Sets a picture (png, jpg) to display on disabled status.

Font styie

Supports Arial, bold, and Microsoft Yahei.

Text color

Sets the text color of the text in the button.

Font size

The font size of the text button.


The text button which displays text in the button.

3-3-13-img-01.png (4.7 kB), 2013-12-03 07:46

3-3-13-img-02.png (11.5 kB), 2013-12-03 07:46

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