Problem with add UI elements on the fly

Hello,

I’m trying to instantiate a text UI element for every string in an array and add those to a vertical box. The problem is that I don’t know how to add an UI element with the correct text. I can add one but I can’t change the text.

A screenshot of how my blueprint looks right now: Screenshot by Lightshot

Thank you in advance

Right now it seems you are adding the same text widget multiple times. You should use the CreateWidget method and use it to instance a widget. Probably the standard textbox is not in that list, so you have to create a custom widget in which you remove the standard panel in it and make it only contain a textbox with your desired properties. Easiest is to add a text property which is expose on spawn and bind the textbox text to that variable.

Thanks, I fixed it with your help, and some other questions in the related question box :slight_smile: Some pictures of what I did: Blueprint on printing the strings: Screenshot by Lightshot, widget: Screenshot by Lightshot