# UMG: Collapsed Buttons still take up Padding Space

**URL:** <https://forums.unrealengine.com/t/umg-collapsed-buttons-still-take-up-padding-space/314206>\
**Category:** UI\
**Tags:** buttons, unreal-engine, Widget, question, UMG\
**Created:** [April 7, 2015, 8:26pm UTC](https://forums.unrealengine.com/t/umg-collapsed-buttons-still-take-up-padding-space/314206 "2015-04-07T20:26:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deventico\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Deventico\_1](https://forums.unrealengine.com/u/Deventico_1)\
**Post date:** [April 7, 2015, 8:26pm UTC](https://forums.unrealengine.com/t/umg-collapsed-buttons-still-take-up-padding-space/314206/1 "2015-04-07T20:26:15Z")

</div>

Hey,

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

![37859-umg.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/f/e/cfe056d6ed9824c6a48ca059c7a4b28436fbd2be.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](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/b/f/4bf7156e160b8158ab781fdd46b04873b09a797f.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?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [April 8, 2015, 3:22pm UTC](https://forums.unrealengine.com/t/umg-collapsed-buttons-still-take-up-padding-space/314206/2 "2015-04-08T15:22:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Deventico\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Deventico\_1](https://forums.unrealengine.com/u/Deventico_1)\
**Post date:** [April 8, 2015, 5:04pm UTC](https://forums.unrealengine.com/t/umg-collapsed-buttons-still-take-up-padding-space/314206/3 "2015-04-08T17:04:46Z")

</div>

> 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:

 ![38017-simple_code.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/5/9/a59a1bbf837651d13d17614fe0b8b96b83ccea75.png)

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

Outcome:

![38018-wrong_outcome.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/9/e/29e575411abb1adb64dc56b2049b26118922bb64.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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [April 8, 2015, 6:00pm UTC](https://forums.unrealengine.com/t/umg-collapsed-buttons-still-take-up-padding-space/314206/4 "2015-04-08T18:00:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Deventico\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Deventico\_1](https://forums.unrealengine.com/u/Deventico_1)\
**Post date:** [April 8, 2015, 6:03pm UTC](https://forums.unrealengine.com/t/umg-collapsed-buttons-still-take-up-padding-space/314206/5 "2015-04-08T18:03:02Z")

</div>

Thank you. I appreciate your time and effort.
