#HELP with scrolling container

10 messages · Page 1 of 1 (latest)

golden tinsel
#

HELP with scrolling container

pine meadow
#

Whatever is displaying the texture, try setting its expand_mode to Ignore Size. As long as it's set to expand it will only draw as big as it needs and ignore the size of the original file.

Also you don't have to ask every question in every channel, people will answer when they can. Markketing strats won't get any more results.

supple pike
#

So if I'm correct you're placing items under VBoxContainer, right? If so, the very first items is only addressed by VBoxContainer.

Say you have a Control node scene (as you said), and structure looks like this -

ScrollContainer
----VBoxContainer
--------Control 1
------------TextureRect
--------Control 2
------------Label

Here, for demonstration purpose I just picked TextureRect and Label as possible childs of the Control node.

So by default, Control node has no min width and height, as well as its expand mode for both vertical and horizontal is false.

  1. As a start try setting expand mode of Control node to Expand for both horizontal and vertical direction. I think that should resolve the overlapping issue.

  2. Then, based on whatever contents you have inside that Control node, you may want that Control doesn't take up the extra space. As such, one way to fix this is that you disable expand mode that you enabled in previous step, and instead set a custom min width and height to Control node. That can give you a bit more control.

There are other ways too, but I don't know what you're putting under Control node scene (which you said it acts as a button). But try going with the above options, and see if it fixes your issue.

golden tinsel
supple pike
#

No it doesn't change anything.

What we need to know is that what is the root node of Scene 1 and 2 if we open them.

If it's Control, then try doing the above steps.

golden tinsel
#

ok it is control ill give it a go

#

that did kinda fx the overlapping problem but the nodes exspand to fit perfectally within the area. The more I add the more the button containers shriink to fit the buttons evenly sporead out in it. RThen when I add to many they start to overlap again instead starting to scroll

golden tinsel
supple pike
# supple pike So if I'm correct you're placing items under VBoxContainer, right? If so, the ve...

Yeah, so it works. Now you can try out the second step that I mentioned in my previous comment. Undo what you just did, i.e. disable expand for both horizontal and vertical. And instead set minimum width and height to the Control node. Found in Layout dropdown - Custom Minimum Size

This way it will always have that minimum width and height. This works well if you already know what size you want. From the image you shared it looks like it will work good for the Upgrade panel/button. As its height is gonna be same I suppose

I think for your case judging from the image, you can leave Expand to true horizontally, and set only the minimum height (and turn off Expand for vertical)

golden tinsel
#

that works perfectally thank you so much