How can I update Text on Text Widget?
How can I update the text on the text widget? Lets say I want to do so when a button is pressed on the UI. Right now I have a simple button, and I want to use the on clicked event to trigger the creation of a text widget, and I want to be able to set that text when it is created.
asked Oct 13 '16 at 05:35 PM in Blueprint Scripting
In your widget containing your text, you'll need to create a binding.
To do so, click the Bind button in the Content tab of the details panel when you have your Text selected and select Create Binding.
This will open up a GetText_0 function, which you can use to pass in whatever text you'd like. You can create a text variable, an array of text and get random messages, make literal text, etc to populate the Return Value. This is what your text will be when you spawn your widget.
Then, on clicked, you'll create your widget and it should get the text you pass into your get text function.
After this, you can update that variable any time at runtime to update the text that is displayed on your widget.
Let me know if you have any further questions regarding this setup and I'll be glad to help.
Have a great day
answered Oct 13 '16 at 05:57 PM
Sean L ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here