Vertical Layout Group background

Hello, Im creating a dropdown menu, everything works as I want, but I have a problem with one thing. As my container for buttons is Vertical Layout Group I cant add any background to it - as it automaticly become another layout element, and doesnt strech on whole container. I also added an Image component on container which have Vertical Layout Group, but it doesnt work eather. Any solution is to this?

Why not just add an image to the gameobject the Vertical Layout component is on?
That will put an image behind all your child components. If you need to have a border outside of the Group, then simply make the layout a child of a larger RectTransform that has an image. Make sense?

2 Likes

Just in case: LayoutElement script has “Ignore Layout” checkbox.

1 Like