[UMG] how to randomize child widget position within border?

hey, i want to dynamically (from code) create and scatter widgets randomly in their parent widget.
how can i do that?

i’ve found a way to set their position manually:

but can’t figure out how to get the parent width and height.

i would be happy for every clue to achieve this. thanks!

You will first need to use the Slot as Canvas Slot node, then you get its Size:

it just returns (0,0) everytime :frowning:

try get desired size?

edit: on the widget, not the canvas slot

Post your blueprint? It works for me. I presume Border is a border yeah?

both “desired size” on widget, and “size” on canvas slot retrieve (0,0)

It’s working for me, there must be something different about your setup that is different, can you post the blueprint or the hierarchy of your widget?

sorry for delay. the relevant screenshots are supplied below.
the frame doesn’t get resized or even referenced anywhere besides that getSize call. as you may see, in the game, the frame widget is visible (as the semi-transparent zone)

do you have a clue? :stuck_out_tongue:

workaround:
use “set translation” instead of “render transform”.

i didn’t figure up how to limit it to the surrounding border specific size yet. but it at least does the job of moving stuff around.