object.placeholder

Type String
Object TextBox
Library native.*
Revision 2017.3060
Keywords native text input
See also native.newTextBox()

Overview

Native text boxes can display optional placeholder text (nil by default). This can provide a "hint" as to what the user should enter in the box. If set, the placeholder string is displayed using the same style information (except the text color). The placeholder does not appear once actual text has been input into the box and it does not currently participate in determining the size of the text box.

Example

local textBox = native.newTextBox( 160, 240, 280, 140 )

-- Optional placeholder (hint) for the text box
textBox.placeholder = "(description)"