Table of Contents
Extends: Group
Description
The TextEditBox node class is intended to display a string of characters as they are typed. When focused, it displays a flashing cursor to indicate the text insertion position.
TextEditBox nodes are automatically included in the Keyboard and MiniKeyboard node classes.
The default appearance of the TextEditBox is very transparent, allowing it to pick up most of its color from what is rendered underneath it. The appearance can be customized by changing the backgroundUri
and other fields.
Fields
Field | Type | Default | Use |
---|---|---|---|
text | string | "" | Contains the string of characters being displayed. |
hintText | string | "" | Specifies a string to be displayed if the length of the text field string is zero. The typical usage of this field is to prompt the user about what to enter (such as, "Enter your WiFi password"). |
maxTextLength | integer | 15 | Specifies the maximum length of the string that can be displayed. When used internal to the Keyboard node, |
cursorPosition | integer | 0 | By default, this is set to the length of the text field, indicating that the next character to be entered should be appended at the end of the string. When used internal to the Keyboard and MiniKeyboard nodes, those nodes use this field to move the text insertion point. |
clearOnDownKey | boolean | true | When clearOnDownKey is set to true, the textEditBox erases all the characters when down key is pressed (focus does not move down). When set to false, the characters are not erased and focus moves down. |
active | boolean | false | When active is set to true, the cursor is displayed. When set to false, the cursor is hidden. When used internal to the Keyboard and MiniKeyboard nodes, those nodes set this field to true when the keyboard has focus, and false when it does not. |
secureMode | boolean | false | When set to true, the characters entered are briefly displayed, then replaced with an asterisk. When set to false, the characters entered are always displayed. When used internal to the Keyboard and MiniKeyboard nodes, you can access the keyboard
|
textColor | color | 0xffffffff | Specifies the color of the text string displayed |
hintTextColor | color | 0xffffffff | Specifies the color of the hint text string |
width | float | -1.0 | Specifies the width of the TextEditBox node. When used internal to the Keyboard and MiniKeyboard nodes, those nodes set this field to match the width of the keyboard. |
backgroundUri | string | "" | Specifies the URI of the image rendered as the background of the TextEditBox node. |