UMG ScrollBox size issues - unwanted padding interfering with desired sizes

Basically, there is unwanted and non-removable extra padding around a ScrollBox that can’t be removed and which makes the size of the box and its content not match the entered sizes in the ScrollBox’s properties.

I’ll explain by means of an example.

  • I created a ScrollBox with a size of 197*x96, and with a vertical scrollbar size of 5 (e.g. 192 + 5)
  • I put a GridPanel inside it.
  • Inside the GridPanel, I placed two 96x96 images, side by side.

And I noticed the following incorrect behaviours:

  • The bottom pixel of each image is cut, and instead there is a single row of empty pixels at the bottom of the ScrollBox.
  • The ScrollBox has a scroll bar visible, which can be used to scroll down to the missing pixel, even though there should be no scrollbar because the content is exactly the same size as the ScrollBox
  • Some portion of the right of the second image is cut off by the scroll bar, because it is (significantly) larger than the 5 pixels specified. Entering larger values also results in the actual size of the scrollbar (plus the space taken up by the padding around the scrollbar) being much larger than the value specified.

I tried playing with various styling options, setting every size and margin to 0, but that did not fix the problem.

The following image shows the problem in the above-described setup.

Note that the image is 96x96, and has a single-pixel red border at its edges, and a single-pixel blue border inside that. You can see that the red border is cut from the bottom, and both the red and blue borders are cut from the right side of the second image.

We have exactly the same issues and did not find a solution.

Anyone knows how to get rid of this extra padding arround the scroll bar?

2 years late,but just in case others are scrolling through.

This is what I do to remove the extra padding caused by the scroll bar from scroll box widgets.
If you have the default setting for a scroll box then use the following:

The way did it was to place your scroll box into a size box, which adds padding capabilities to the scroll box. Go to the Padding as below and set it to a negative value for Left. With default settings (Bar width etc) -15 works for me. Adjust the left padding to suit your scroll bar size more precisely.