Hi, is there any way to do what the title says, considering the grid resides in a canvas panel?
Thanks.
I believe you can just read the desired size here. Alternativelly, get canvas slot and read size.
Thanks. Unfortunately, ‘as canvas slot’ → ‘get size’ only gets whichever size you set in the details tab. And ‘get desired size’ returns 0.
I need the size of the grid AFTER it’s been populated with content at runtime.
Takes a while to layout a widget, if you need the result this frame and cannot wait until the next tick, pre-pass it early:
Thanks. I’m adding children in a loop, like this:
… but I still get 0, even with prepass.
Edit: my widget construct has none because this is just for the snippet.
You Force Layout Prepass
on the wrong widget. See my pic.
I disconnected the widget from the force prepass node, like in your pic, but I get the same thing, 0.
What is your grid inside of?
duh
considering the grid resides in a canvas panel?
Hold on.
Not sure what else is going on on your end, this has always worked OK:
Doing it after Completed also works fine. And tried with Construct. UE v5.3.1
I had it under “OnInitialized”. I switched to “Construct” and it’s working now.
Thanks a lot.
Yeah, Init is way too early.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.