Resizeable ColorRect
Asked Answered
A

1

0

Is there a way to have, for example, a VBoxContainer with a background color? I'd like to have an area whose width is fixed but height changes depending on the height of its children and have the background color change height as well.

Aweless answered 19/2 at 20:29 Comment(0)
A
0

I couldn't get this to work with a regular Panel element but I found out about PanelContainer by accident. PanelContainer will automatically resize based on the size of its children. So, you can put a HBoxContainer or VBoxContainer as the child of a PanelContainer and the background color provided by the PanelContainer will automatically resize when you add elements to the HBoxContainer or VBoxContainer.

Aweless answered 15/3 at 16:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.