UMG: Collapsed Buttons still take up Padding Space

Hey,

I have a bunch of buttons set up inside a WrapBox like this:

37859-umg.png

Each button has a padding value of 25. I did not set up anything else in regards to padding.

Now I set the middle buttons visibility to Collapsed. Ingame it looks like this:

37871-ingame.png

I wanted the button to vanish completely, with padding and all so the next button can take it’s place.

Is this meant to look like this?

Hello Deventico,

Update: I removed my previous statement after receiving more information on the problem and I have written up a report for this issue.

Make it a great day

I believe this is working as intended because the button is still there and so it will retain it’s padding settings.

I believe this is not working as intended since collapsed buttons in Vertical Box, Horizontal Box and Border do not retain their padding settings. Or is this a bug in those container widgets?

However, you could try removing the button via the “Remove from parent” node. This will cause everything to shift over, which achieve the desired effect.

The beautiful thing with collapsing a button is that it can be made visible again. If I remove a buton and re-add it, the padding is all screwed up. Simple code:

Please don’t suggest that I might be using the wrong “add child” node - both fail.

Outcome:

38018-wrong_outcome.png

“No problem”, I thought, I’ll just readjust the padding each time I re-add a button. Minor inconvenience, but UE4 requires me to use workarounds almost daily anyway.

Problem: To my knowledge you can’t set button padding from blueprint

Hello Deventico,

After looking over the information that was given in your second post I am inclined to agree with you that the widgets should be more consistent in this respect and so I have written up a report ( UE-13439) for the Wrap Box to update the positions of its children. I have submitted this report to the developers for further consideration. I will provide updates with any pertinent information as it becomes available. Thank you for your time and information.

Make it a great day

Thank you. I appreciate your time and effort.