Hello guys
You can remove or know the inner margin of the native text fields?
I need to synchronize the text below the textfield to be able to create a better user interface.
Thanks
Hello guys
You can remove or know the inner margin of the native text fields?
I need to synchronize the text below the textfield to be able to create a better user interface.
Thanks
You could make the text field backgrounds invisible and draw them on top of your own backgrounds.
Hi Rob,
I need to align the newText with newTextField.
But the margins of devices prevent me from getting it.
The devices (Motorola, Samsung and ios) has different internal margins in the text fields.
Ex:

local group = display.newGroup() local rect = display.newRect(group, 0, 0, 240, 40) rect.anchorX = .5 rect.anchorY = .5 rect:setFillColor(0) local placeholder = display.newText{ parent = group, text = 'Place holder', fontSize = 14, font = app.fontRegular, x = rect.x, width = rect.width } placeholder.anchorX = .5 placeholder.anchorY = .5 placeholder.y = placeholder.height - rect.height \* .5 local field = native.newTextField(0, 0, rect.width, 30) field.anchorX = .5 field.anchorY = .5 field.font = native.newFont(app.fontRegular, placeholder.size) field.hasBackground = false field:setTextColor(1) field:resizeHeightToFitFont() field:localToContent(placeholder.x, placeholder.y) group:insert(field)
There is really nothing we can do about this.
Rob
You could make the text field backgrounds invisible and draw them on top of your own backgrounds.
Hi Rob,
I need to align the newText with newTextField.
But the margins of devices prevent me from getting it.
The devices (Motorola, Samsung and ios) has different internal margins in the text fields.
Ex:

local group = display.newGroup() local rect = display.newRect(group, 0, 0, 240, 40) rect.anchorX = .5 rect.anchorY = .5 rect:setFillColor(0) local placeholder = display.newText{ parent = group, text = 'Place holder', fontSize = 14, font = app.fontRegular, x = rect.x, width = rect.width } placeholder.anchorX = .5 placeholder.anchorY = .5 placeholder.y = placeholder.height - rect.height \* .5 local field = native.newTextField(0, 0, rect.width, 30) field.anchorX = .5 field.anchorY = .5 field.font = native.newFont(app.fontRegular, placeholder.size) field.hasBackground = false field:setTextColor(1) field:resizeHeightToFitFont() field:localToContent(placeholder.x, placeholder.y) group:insert(field)
There is really nothing we can do about this.
Rob