Closed tcfunk closed 8 years ago
What you want is panel.root.text = "new text"
.
Layouts contain a tree of widgets; that "text" property and the others are really properties of the root widget, not properties of the layout. It's just a bit confusing in this case because you only have a root widget with nothing under it, so it doesn't look like a tree.
A layout's root widget is stored in layout.root
.
Ah yep that worked wonderfully, thank you @airstruck
I have a panel that I'm using for a a dialog box, but I seem to be unable to get the text component of it to update correctly.
Here's the panel I create:
Once I've caled
panel:show()
, however, I can't seem to update the text. Even if I callpanel:hide()
, then change the text, and callshow()
again.Edit: To be more specific, I'm attempting to update the text as follows: