:github_url: hide .. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the MarginContainer.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_MarginContainer: MarginContainer =============== **Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` **Category:** Core Brief Description ----------------- Simple margin container. Theme Properties ---------------- +-----------------------+---------------+---+ | :ref:`int` | margin_bottom | 0 | +-----------------------+---------------+---+ | :ref:`int` | margin_left | 0 | +-----------------------+---------------+---+ | :ref:`int` | margin_right | 0 | +-----------------------+---------------+---+ | :ref:`int` | margin_top | 0 | +-----------------------+---------------+---+ Description ----------- Adds a top, left, bottom, and right margin to all :ref:`Control` nodes that are direct children of the container. To control the ``MarginContainer``'s margin, use the ``margin_*`` theme properties listed below. **Note:** Be careful, :ref:`Control` margin values are different than the constant margin values. If you want to change the custom margin values of the ``MarginContainer`` by code, you should use the following examples: :: var margin_value = 100 set("custom_constants/margin_top", margin_value) set("custom_constants/margin_left", margin_value) set("custom_constants/margin_bottom", margin_value) set("custom_constants/margin_right", margin_value)