I cannot figure out how to change (slot?) ordering at runtime. What I want to do is add a variable number of buttons to the Vertical Box, but keep the selected button at the bottom of the box.
As I know the Z-order sometimes works sometimes not, I suggest just to play with the boxes have invisible one under or just add a new one at top(not sure what you want to do here so can’t really guide you how to do it so do please explain a little bit more on what you want to do, be cool if you drop a few more screenshots).
You cannot zOrder elements of a Vertical Box in blueprints. zOrder is a Canvas slot property (and viewport’s - but that’s not the case here).
Consider using a Canvas as the container here - then you can directly set zOrder of its children. This will give you plenty of granular control over positioning since you have access to anchors here.
You could even wrap the left / right arrows with a Horizontal Box and the up / down with a Vertical Box - you can then change the zOrder of the H/V boxes in the canvas - so the appropriate set of arrows pops to the top.
For Overlays it’s the hierarchy that dictates what renders on top.
I read DDemon comment and got distracted. I think this is not about zOrder at all! ;p The pic does look somewhat relevant, though.
Yeah XD, that why I asked for more info but who knows maybe your approach will work in what he doing.
Unfortunately neither of your comments apply as far as I know, as I am not dealing with overlapping widgets, but what I can best define as: reordering the slots of the vertical box dynamically.
You cannot do it directly in BPs. You can add the widgets to an array, reorder the array, clear the widget container and repopulate.
Alright good to know, thanks Everynone