:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/3.5/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/3.5/doc/classes/Container.xml. .. _class_Container: Container ========= **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` **Inherited By:** :ref:`AspectRatioContainer`, :ref:`BoxContainer`, :ref:`CenterContainer`, :ref:`EditorProperty`, :ref:`FlowContainer`, :ref:`GraphNode`, :ref:`GridContainer`, :ref:`MarginContainer`, :ref:`PanelContainer`, :ref:`ScrollContainer`, :ref:`SplitContainer`, :ref:`TabContainer`, :ref:`ViewportContainer` Base node for containers. Description ----------- Base node for containers. A ``Container`` contains other controls and automatically arranges them in a certain way. A Control can inherit this to create custom container classes. Tutorials --------- - :doc:`GUI containers <../tutorials/ui/gui_containers>` Methods ------- +------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`fit_child_in_rect` **(** :ref:`Control` child, :ref:`Rect2` rect **)** | +------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`queue_sort` **(** **)** | +------+----------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- .. _class_Container_signal_sort_children: - **sort_children** **(** **)** Emitted when sorting the children is needed. Constants --------- .. _class_Container_constant_NOTIFICATION_SORT_CHILDREN: - **NOTIFICATION_SORT_CHILDREN** = **50** --- Notification for when sorting the children, it must be obeyed immediately. Method Descriptions ------------------- .. _class_Container_method_fit_child_in_rect: - void **fit_child_in_rect** **(** :ref:`Control` child, :ref:`Rect2` rect **)** Fit a child control in a given rect. This is mainly a helper for creating custom container classes. ---- .. _class_Container_method_queue_sort: - void **queue_sort** **(** **)** Queue resort of the contained children. This is called automatically anyway, but can be called upon request. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`