Godot 4.0 - How to make an HBoxContainer automatically resize itself to the size of the viewport?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By pew;

I have the following node structure:

-- ...unrelated nodes like player's sprite etc....
-- CanvasLayer/
---- HBoxContainer/
------ Panel

HBoxContainer is setup to expand it’s children horizontally and this part works fine, Panel is automatically resized to take up all available space in container.
I want to make container to automatically change it’s horizontal size to the viewport ones, so that the Panel occupies all screen width. Any idea how to do that?

:bust_in_silhouette: Reply From: exuin

change the layout to full rect or just wide, it’s in the top bar