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.
Resizeable ColorRect
Asked Answered
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.
© 2022 - 2024 — McMap. All rights reserved.