How to set size of widget inside a scrollbox?

Hi all!

I have some widgets with buttons in root. I want to set those widgets in scrollbox menu, but they appear very small.

Size of widgets:

X = size of scrollbox

Y = ???

22364-2014-11-27+21-23-33+vescinventory4+-+unreal+editor.png

So… How to set Y size of widgets?
I tried to “set des. size in viewport”, before i add them to scrollbox, bu it didnt work. Tried to Set Size of Grid, UniGrid and vertBox slots, but that didn’t help me as well.

Someone? :frowning:

Hi AIFlakky,

Can you show us an image of Designer for your Widget, including Hierarchy panel so we can see how you have this set up? You can also and attach .uasset file if that’s easier. Thanks!

Here it is… Left is scrollbox with widgets, right is widget with button, that i want to add in ScrollBox.

Hello ,

If you would like to be able to set size of things in your scroll box, one of ways that I have found to do this is to add a canvas panel to your scroll box. You can use multiple canvas panels if needed. It will appear very small at first but as soon as you place anything inside canvas panel it will assume size of what ever widget you place in it. You can then size it to your specifications . I have attached an image to show my hierarchy. I hope this helps.

Make it a great day

Thank for answer, but i still have very small size. How did you change size of CanvasPanel? I use 4.5.1

Hello ,

After further testing it appears that workflow that I gave is only viable in 4.6. I was unable to come up with a workaround for 4.5.1 version of engine. As you can see this is a known issue and it has been addressed in a later version.

Well ok then. Will continue to work on this part, after 4.6 will be released.
But it would be great, if we can set size of slots right in ScrollBox/VerticalBox settings. Or in slots settings, because now it looks like it sets size of widgets or CanvasPanels to 0.

Anyway, thank you for answering me! :slight_smile:

Very helpful, thank you!

It not work for me.
I`m 4.8.3.

Hello ,

I just tried this solution in 4.8.3 and appears to work as expected. hierarchy is as follows:

[v] Canvas panel

    [v] ScrollBox

        [v] CanvasPanel 

               -YourWidget

After you have this setup you can then change size of your widget. I hope that this helps.

Make it a great day

I found Size-Scale-Image works for me in 4.20 and setting say 200 as max Desired Height in Size widget.

1 Like