Class cc.EditBox

Class Summary
Constructor Attributes Constructor Name and Description

cc.EditBox is a brief Class for edit box.

Method Summary

Class Detail


cc.EditBox is a brief Class for edit box.
You can use this widget to gather small amounts of text from the user.

Field Detail

{Object} delegate
- <@writeonly> Delegate of edit box
{String} font
- <@writeonly> Config font of edit box
{cc.Color} fontColor
- <@writeonly> Config font color of edit box
{String} fontName
- <@writeonly> Config font name of edit box
{Number} fontSize
- <@writeonly> Config font size of edit box
{Number} inputFlag
- <@writeonly> Input flag of edit box, one of the EditBoxInputFlag constants.
{Number} inputMode
- <@writeonly> Input mode of the edit box. Value should be one of the EditBoxInputMode constants.
{String} maxLength
- Max length of the content string
{String} placeHolder
- Place holder of edit box
{String} placeHolderFont
- <@writeonly> Config font of place holder
{cc.Color} placeHolderFontColor
- <@writeonly> Config font color of place holder
{String} placeHolderFontName
- <@writeonly> Config font name of place holder
{Number} placeHolderFontSize
- <@writeonly> Config font size of place holder
{Number} returnType
- <@writeonly> Return type of edit box, value should be one of the KeyboardReturnType constants.
{String} string
- Content string of edit box

Method Detail

  • <static> cc.EditBox.create(size, normal9SpriteBg, press9SpriteBg, disabled9SpriteBg)
    create a edit box with size and background-color or
    {cc.Size} size
    {cc.Color | cc.Scale9Sprite} normal9SpriteBg