Show us the slot the border is in (its parent), at the top of the details panel when you select the border. If the border is sitting in a canvas panel, and you do not size to content, you’d get the above, undesired result, for example.
The border is part of a horizontal box, so no option to size to content:
I tried to change the auto/fill option but “fill” messes up the whole display at runtime (only): the buttons are moved to the left and disappear behind the rest of the UI.
In the editor, pretty much all options work fine, but as soon as i go in game, the display goes wrong.
The global structure of the UI is quite simple: a border that contains a horizontal box, which contains 3 UI borders:
If the parent is a horizontal box, you have 2 options here:
https://forums.unrealengine.com/core/image/gif;base64
use Fill, which gives you a number (to the right of Fill) to play with - this is the amount of space percentage-wise in 0-1 range this element will occupy in the h-box. Setting the 3 borders to Fill 0.4 | 0.4 | 0.2 ] - they give them 40%, 40% and 20% of the available space respectively:
or wrap the offending border with a Size Box and override the desired Height and Width. This will force any and all parents to respect those values when they calculates their own desired sizes in relation to their own parents.
This would solve any internal shenanigans.
[HR][/HR]
Another thing we’re not seeing here is the parent of this very widget. Since it does not have its own canvas (and it probably should not), you, most likely, add it to another container. This new container can and will affect the child’s overall behaviour since it will create a new slot for it.
So even if I create my perfectly looking widget above and then place it another container (here, a canvas)…
…I end up with this mess, where the buttons want to preserve their size, inherited clipping allows for the bleeding, the vertical box does what it can to accommodate things but the canvas slot this widget is sitting in overrides the size to 100 | 50.27. The poor vertical boxes conforms to whatever size is forced by the canvas.
Size To Content would ignore the canvas’s request. In short: do check the slot this widget is added to as well, for example: