Type Boolean Object TextBox Library native.* Revision Release 2024.3703 Keywords text input, text box, native text See also native.newTextBox() native.newTextField()
Controls whether the text box has an opaque background or not. Default is true
(opaque).
This property is not supported in Win32 desktop apps or in the Corona Simulator for Windows.
-- Draw red background local rect = display.newRect( 0, 0, 320, 480 ) rect:setFillColor( 1, 0, 0 ) -- Text box with transparent background local textBox = native.newTextBox( 160, 240, 280, 140 ) textBox.font = native.newFont( "Helvetica-Bold", 16 ) textBox:setTextColor( 0.8, 0.8, 0.8 ) textBox.hasBackground = false textBox.text = "Hello, world!"