Resizing a created and stored widget in runtime

Hey guys,

I am trying to create a bunch of widgets on the fly, store them in an array of structs, access the widget at a later point in time and adjust the size of the widget. My logic seems to be stellar and it hits SetSize function on the widget (See point 2) but it doesn’t seem to update the widget size at all. Does anyone know what could be causing this?

Thanks,
Kishore

  1. I get the widget of interest from a struct which is stored in Array. The get operation in this particular screen shot does a ref get.

  1. I get the canvas slot from the stored widget and try to resize it. It does hit the SetSize here and the value that goes in is accurate as well. But it doesn’t actually resize.

  1. I create and store the widget prior during construct time in a struct which has a reference to the Widget of similar type.

Works as expected. Make sure you actually getting a valid ref (also check your Log) and that your Indexes are correct. You probably dealing with a logic issue here not a technical one or a Bug.

Result: Screen capture - 089c6faeecc0e64d91556b0136d6cc3b - Gyazo

Weird. I changed the Add child to canvas node in mine to Add Child node like yours and it worked. I am going to stick with this for now, but I will try to understand what was going wrong sometime soon. Thanks!