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

UI Widget UIField



The UIField subclass implements the field in the touch screen. The UIField subclass is a subclass of UIWidget.
The widget provides methods to set the font size, font, password mode, length, text, placeholder text and other attributes.

3x3 grids

For more information, see 3x3 grids.

Common properties

For more information, see Common properties.


font size

Sets the font size.


Now supports only Arial, bold, and Microsoft Yahei.

Open password

  1. Sets whether to open the password field style.
  2. For character style, set a password character display style.
  3. The character style input limit is to use only ASCII (33-126) for a single character.

Length limit

  1. Sets whether to open the field text length limit.
  2. Sets the maximum length of the field.


Displays text.


Sets opening the field text length limit or not.

3-3-14-img-01.png (5.2 kB), 2013-12-03 07:53

3-3-14-img-02.png (10.5 kB), 2013-12-03 07:53

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