![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | deepseaprincess |
I’m trying to dynamically add LineEdit fields to my ui so that users can enter additional properties. This is what the scene looks like:
Here is the code attached to the “Add Property” button:
func _pressed():
var labelProp = Label.new()
labelProp.text = "Property"
add_child(labelProp)
var lineProp = LineEdit.new()
add_child(lineProp)
labelProp = Label.new()
labelProp.text = "Property Value"
add_child(labelProp)
lineProp = LineEdit.new()
add_child(lineProp)
When I click the Add Property button this is what happens:
What can I do to get the LineEdit fields properly added?