# How to adjust the size of a button (child) of a scrollbox?

**URL:** <https://forums.unrealengine.com/t/how-to-adjust-the-size-of-a-button-child-of-a-scrollbox/453253>\
**Category:** UI\
**Tags:** button, size, scrollbox, unreal-engine, Widget, UE4, question\
**Created:** [August 2, 2019, 5:07pm UTC](https://forums.unrealengine.com/t/how-to-adjust-the-size-of-a-button-child-of-a-scrollbox/453253 "2019-08-02T17:07:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Morhol](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Morhol](https://forums.unrealengine.com/u/Morhol)\
**Post date:** [August 2, 2019, 5:07pm UTC](https://forums.unrealengine.com/t/how-to-adjust-the-size-of-a-button-child-of-a-scrollbox/453253/1 "2019-08-02T17:07:56Z")

</div>

Hi, I’m slowly getting mad here searching for a fix since hours. I created a HUD-like widget. It contains a scrollbox (Inventory) to show the inventory items of the player, represented by 18 possible buttons (InvSlot01 - InvSlot18). I remove all of those from parent to empty the scrollbox when the game starts. Then, after you gathered an item, I add that specific button as a child to the scrollbox.  
It works, but no matter what the image size of the button is, the result seems to be scaled relative to that scrollbox and loses the original button size. I tried to wrap that buttons with a Size Box or a Wrap Box, but then the screen remains black, I don’t see the content of those boxes. Set Size function doesn’t accept the button as a target. Any help is highly appreciated.

 ![283956-widget.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/4/a/54adb8c830316d4550341e33220d2b380567b067.png)

 ![283957-rebirth.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/4/d/34da54d1d9c560d69ac7af54ffe99126cba5bf0c.png)

 ![283958-screen.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/1/6/21604f506df0ac8fa48245ddb1d7445e3621b3ed.jpeg)

---

<div class="post-metadata">

**Author:** ![Beres-Taar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Beres-Taar](https://forums.unrealengine.com/u/Beres-Taar)\
**Post date:** [August 2, 2019, 5:42pm UTC](https://forums.unrealengine.com/t/how-to-adjust-the-size-of-a-button-child-of-a-scrollbox/453253/2 "2019-08-02T17:42:38Z")

</div>

Try placing an overlay as the child to either the inventory window or the scroll box, then place the button image (which should already have the size box on it), somewhere into that overlay, where ever you think is best. Or maybe open up the image and set its scale manually if you havent tried that already.

I struggled with something similar so hopefully some of my mistakes and lessons can help you find a way 🙂

---

<div class="post-metadata">

**Author:** ![Morhol](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Morhol](https://forums.unrealengine.com/u/Morhol)\
**Post date:** [August 2, 2019, 5:54pm UTC](https://forums.unrealengine.com/t/how-to-adjust-the-size-of-a-button-child-of-a-scrollbox/453253/3 "2019-08-02T17:54:51Z")

</div>

Yesssssss! You are my hero, not just for one day! 😜

I wrapped that inventory scroll box with an overlay and now it’s fine! Finally I can move on recreating the Scumm™-system. ^^

---

<div class="post-metadata">

**Author:** ![Beres-Taar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Beres-Taar](https://forums.unrealengine.com/u/Beres-Taar)\
**Post date:** [August 2, 2019, 5:58pm UTC](https://forums.unrealengine.com/t/how-to-adjust-the-size-of-a-button-child-of-a-scrollbox/453253/4 "2019-08-02T17:58:03Z")

</div>

wow! first time on this forum actually trying to help people and it makes me so happy to see that my input helps! Good luck with your project!
