Class ccs.TextField

Class Summary
Constructor Attributes Constructor Name and Description
 
Base class for ccs.TextField

Method Summary

Class Detail

ccs.TextField()
Base class for ccs.TextField

Method Detail

  • addEventListenerTextField(selector, target)
    add event listener
    Parameters:
    {Function} selector
    {Object} target
  • <static> {ccs.TextField} ccs.TextField.create()
    allocates and initializes a UITextField.
    // example
    var uiTextField = ccs.TextField.create();
    Returns:
    {ccs.TextField}
  • didNotSelectSelf()
    detach with IME
  • {Boolean} getAttachWithIME()
    get whether attach with IME.
    Returns:
    {Boolean}
  • {cc.Size} getContentSize()
    override "getContentSize" method of widget.
    Returns:
    {cc.Size}
  • {Boolean} getDeleteBackward()
    Returns:
    {Boolean}
  • {string} getDescription()
    Returns the "class name" of widget.
    Returns:
    {string}
  • {Boolean} getDetachWithIME()
    get whether eetach with IME.
    Returns:
    {Boolean}
  • {String} getInsertText()
    get insertText
    Returns:
    {String}
  • {number} getMaxLength()
    Returns:
    {number} length
  • {String} getStringValue()
    get textField string value
    Returns:
    {String}
  • {cc.Node} getVirtualRenderer()
    override "getContentSize" method of widget.
    Returns:
    {cc.Node}
  • {boolean} hitTest(pt)
    check hit
    Parameters:
    {cc.Point} pt
    Returns:
    {boolean}
  • {Boolean} isMaxLengthEnabled()
    Returns:
    {Boolean}
  • {Boolean} isPasswordEnabled()
    Returns:
    {Boolean}
  • onTouchBegan(touchPoint)
    touch began
    Parameters:
    {cc.Point} touchPoint
  • onTouchEnded(touchPoint)
    touch ended
    Parameters:
    touchPoint
  • setAnchorPoint(point, y)
    override "setAnchorPoint" of widget.
    Parameters:
    {cc.Point|Number} point
    The anchor point of UILabelBMFont or The anchor point.x of UILabelBMFont.
    {Number} y Optional
    The anchor point.y of UILabelBMFont.
  • setAttachWithIME(attach)
    set attach with IME.
    Parameters:
    {Boolean} attach
  • setDeleteBackward(deleteBackward)
    Parameters:
    {Boolean} deleteBackward
  • setDetachWithIME(detach)
    set detach with IME.
    Parameters:
    {Boolean} detach
  • setFontName(name)
    Parameters:
    {String} name
  • setFontSize(size)
    Parameters:
    {cc.Size} size
  • setInsertText(insertText)
    set insertText
    Parameters:
    {String} insertText
  • setMaxLength(length)
    Parameters:
    {number} length
  • setMaxLengthEnabled(enable)
    Parameters:
    {Boolean} enable
  • setPasswordEnabled(enable)
    Parameters:
    {Boolean} enable
  • setPasswordStyleText(enable)
    Parameters:
    {String} enable
  • setPlaceHolder(value)
    Parameters:
    {String} value
  • setText(text)
    Changes the string value of textField.
    Parameters:
    {String} text
  • setTouchSize(size)
    set touch size
    Parameters:
    {cc.Size} size