Can you set a readonly property on a native textbox?
You can control if a TextBox is read-only or not via its “isEditable” property. Have a look here…
Thanks! THat’s what I needed!
I’m using the following code for my textarea and it’s still not readonly. They can edit it just fine.
-- Create text field Row4TextArea = native.newTextField( 20, 200,280, 36 ) Row4TextArea.anchorX = 0 Row4TextArea.anchorY = 0 Row4TextArea.hasBackground = false Row4TextArea:setTextColor( 1,1,1 ) Row4TextArea.inputType = "phone" Row4TextArea.text = globals.MedCommand Row4TextArea.isEditable = false
This really needs to be a readonly field. Is there something I’m doing wrong?
The “isEditable” property is only supported by TextBoxes, not TextFields.
That was the problem. I was using the wrong text field / text area.
Thank you!
You can control if a TextBox is read-only or not via its “isEditable” property. Have a look here…
Thanks! THat’s what I needed!
I’m using the following code for my textarea and it’s still not readonly. They can edit it just fine.
-- Create text field Row4TextArea = native.newTextField( 20, 200,280, 36 ) Row4TextArea.anchorX = 0 Row4TextArea.anchorY = 0 Row4TextArea.hasBackground = false Row4TextArea:setTextColor( 1,1,1 ) Row4TextArea.inputType = "phone" Row4TextArea.text = globals.MedCommand Row4TextArea.isEditable = false
This really needs to be a readonly field. Is there something I’m doing wrong?
The “isEditable” property is only supported by TextBoxes, not TextFields.
That was the problem. I was using the wrong text field / text area.
Thank you!