Download

Adding to widgets to a parent widget, rather than to the main screen

So here’s my problem - I have a widget WB_Parent, and I want to add child widgets to it, but on the fly, with blueprint code. However, I want its position to be set relative to the parent, not to the main screen. So far, I only see an option to Set Position in Viewport, and that seems to take the global screen coordinates. I know I can do coordinate calculations, but I was wondering if there was another (preferably easier and more straightforward) way to solve this problem.

Hello, I guess you are looking for something like this:

a90d899f254f6319994cab6e25020b729c408c20.jpeg

Life-saving advice! Thank you!

You are welcome. Good luck with your project.

Hey, it doesn’t work for me!

You’ll need to elaborate a bit.

Set " Is Variable" in your design windows to be able to use it in your BP