You have two approaches to this:
- Make an event that sets the text as you want it that is being called from outside the widget and pass the int as a parameter.
- Make a variable inside the widget of type integer OR whatever actor that has the int. Give the widget a copy of the int or a reference to the actor which has the int you need and simply access the int or actor reference when you need to set the text.
HTH