UMG size to content

I have a VerticalBox with two items, A UniformGrid and a NamedSlot.
The NamedSlot contains different items according to where you are in a menu.

Problem: The NamedSlot does not take its space when I set VerticalBox to Size to Content as shown in the image below. Since I have NamedSlot widgets with varying sizes I cannot set it to a fixed size(some even start as collapsed)

Hello Onack,

I was unable to reproduce this issue on my end. The Vertical box appears to re-size correctly (does not leave out any name slots). I have a few question to help narrow down what issue it is that you are experiencing.

Quick questions:

  1. What version of the engine are you using?
  2. Can you reproduce this in a clean project?
  3. If so, could you provide a detailed set of steps to reproduce this issue on our end?
  4. What setting are you using for the Name slots (settings such as Fill and alignment)?

1: 4.6.1 build from source

2: Yes I tried this just now

3&4: Testmenu: Root → CanvasPanel->VerticalBox(Anchored to sides with 2x0 offset):
UniformGridPanel with 1 button in center(no changes to settings)
NamedSlot with Testwidget(Size to Fill 1.0, else it becomes 0 in height)

Testwidget: Root-> CanvasPanel ->VerticalBox:
Bunch of Text to fill vertical space
Only changed setting in this class is VerticalBox anchor, anchored to all sides and offset to 4x0 to fill whole area

Test classes: Dropbox - File Deleted

Hello Onack,

I believe I was able to reproduce the result you are seeing. If you set the Size to content for the vertical box in TestWidget to True, this should fix your issue. I hope this helps.

Yep that works, thanks a lot. Its logical when you say it, but I didn’t think of it, nor did any in #unrealengine when I asked about it earlier.

Hello Onack,

I am happy that I could help.

Make it a great day