Skip to content
9miao Mobile Game edited this page Jul 8, 2014 · 2 revisions

CATextField Detailed Description

Class Description

Text field control

Base Class

CAControl

Attribute

Access modifier

Attribute name

Description

protected

BackGroundImage

Text field background

protected

PlaceHolder

Text field prompt message

protected

Text

Text that we typed

protected

CharCount

Character count

protected

SpaceHolderColor

Prompt message color

protected

TextColor

Text color

protected

TextAlignment

Text’s horizontal alignment mode

protected

FontSize

Font size

protected

InputType

Input type

protected

CursorColor

Cursor color

Attribute Description

BackGroundImage
Type: CAImage*
Description: text field background, get/set{}.

PlaceHolder
Type: string
Description: prompt text by default when we have not click in text field, the prompt message will auto disappear when system obtains cursor, get/set{}.

Text
Type: string
Description: text content that we typed, system will auto hide some typed texts when the inputted text content exceeds the given textField length limit, get/set{}.

CharCount
Type: int
Description: textField max characters, we are not able to input more content when the typed content exceeds the given charCount value.

SpaceHolderColor
Type: CAColor4B
Description: prompt text color, get/set{}.

TextColor
Type: CAColor4B
Description: text color, get/set{}.

TextAlignment
Type: CATextAlignment
Description: text’s alignment mode, left alignment, center alignment and right alignment, get/set{}.

1

2

3

4

5

6

typedef enum

{

    CATextAlignmentLeft,

    CATextAlignmentCenter,

    CATextAlignmentRight,

} CATextAlignment;

FontSize
Type: float
Description: text’s font size, get/set{}.

InputType
Type: eKeyBoardInputType
Description: text type, it is normal status by default and also includes text style when typing password, get/set{}.

1

2

3

4

5

enum eKeyBoardInputType

{

     KEY_BOARD_INPUT_NORMAL=1,

     KEY_BOARD_INPUT_PASSWORD,

};

CursorColor
Type: CAColorB
Description: cursor color, get/set{}.

Clone this wiki locally