I am trying to have a default text, display in a textField before the user types something in the text field, I have created a textField that pretty much looks like a gray square in the simulator and no text within the text field.
To add the textfield I used object.text = “Text”
But no luck
I’m not sure what I am doing wrong, here is a copy and paste of my code and a screenshot of the simulator, I’m not sure if that is what text fields are supposed to look like in the simulator.
--Set constant width and height of screen. \_W = display.actualContentWidth \_H = display.actualContentHeight --Create white background local background = display.newRect(0, 0, \_W, \_H) background:setFillColor ( 255,255,255 ) --Field create and position local distanceField = native.newTextField ( 0, 0, \_W\*.8, 35) distanceField.x = \_W \* .5 distanceField.y = 100 --Properties distanceField.inputType = "default" distanceField.font = system.nativeFont distanceField.align= "center" distanceField.size = 32 distanceField.text = "Hello World!" distanceField:setTextColor ( 0, 0, 0,0 )