Skip to end of metadata
Go to start of metadata

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

FieldTypeDefaultUse
textstring""Contains the string of characters being displayed.
hintTextstring

""

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").
maxTextLengthinteger

15

Specifies the maximum length of the string that can be displayed.

When used internal to the Keyboard node, maxTextLength is initialized to 75. When used in the MiniKeyboard node, maxTextLength is initialized to 25.

cursorPositioninteger

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.

activeboolean

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.

secureModeboolean

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 textEditBox field to set its secureMode field. For example:

myKeyboard.textEditBox.secureMode = true

textColorcolor

0xffffffff

Specifies the color of the text string displayed

hintTextColorcolor0xffffffffSpecifies the color of the hint text string
widthfloat-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.

backgroundUristring""Specifies the URI of the image rendered as the background of the TextEditBox node.
  • No labels