Download

[UMG] Background image or color for UMG vertical box

How do you get a non transparent vertical box in UMG? If I add an image it just throws it under/above my content rather than filling the box. I am dynamically updating the y position of the contents based off of a scale box holding text and want a background color to adjust with it.

I have also tried to place all the vertical box contents inside of an overly within the vertical box, but that just stacks all the contents.

This, if I understood you correctly:

Capture.PNG

Well, this is how I originally approached it. My setup consists of a vertical box that contains 3 text blocks (title, subtitle, and info) and a horizontal box (3 buttons). My info text block is in a sizebox to allow for my buttons to rise/lower with the height of that text block. So my problem is anything outside of the vertical box is static and unresponsive to my dynamic changes, and if inside the vertical box, it just gets put into the hierarchy of the contents.

Is there a way to get the combined height of the vertical box contents? I can plug that into set size in the image canvas slot if there is a way.

It’s the Desired Size of the vertical box. Although I’ll admit I do not fully understand what you’re trying to achieve. If you need the overlay with the background image to conform automatically, place the overlay in the canvas and flag *Size To Content *as true.

Wow … overlooked that Size To Content button. DesiredSize kept returning 0,0. All good now Thank you for your help!

You’d need to wait for Tick before taking measurements, this can be done via Force Layout Prepass and then checking for Desired Size. Glad to hear it worked out.