mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
75 lines
2.4 KiB
ReStructuredText
75 lines
2.4 KiB
ReStructuredText
.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
|
|
.. DO NOT EDIT THIS FILE, but the BoxContainer.xml source instead.
|
|
.. The source is found in doc/classes or modules/<name>/doc_classes.
|
|
|
|
.. _class_BoxContainer:
|
|
|
|
BoxContainer
|
|
============
|
|
|
|
**Inherits:** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
|
|
|
**Inherited By:** :ref:`VBoxContainer<class_VBoxContainer>`, :ref:`HBoxContainer<class_HBoxContainer>`, :ref:`ColorPicker<class_ColorPicker>`
|
|
|
|
**Category:** Core
|
|
|
|
Brief Description
|
|
-----------------
|
|
|
|
Base class for box containers.
|
|
|
|
Properties
|
|
----------
|
|
|
|
+-----------------------------------------------+------------------------------------------------+
|
|
| :ref:`AlignMode<enum_BoxContainer_AlignMode>` | :ref:`alignment<class_BoxContainer_alignment>` |
|
|
+-----------------------------------------------+------------------------------------------------+
|
|
|
|
Methods
|
|
-------
|
|
|
|
+-------+--------------------------------------------------------------------------------------------+
|
|
| void | :ref:`add_spacer<class_BoxContainer_add_spacer>` **(** :ref:`bool<class_bool>` begin **)** |
|
|
+-------+--------------------------------------------------------------------------------------------+
|
|
|
|
Enumerations
|
|
------------
|
|
|
|
.. _enum_BoxContainer_AlignMode:
|
|
|
|
enum **AlignMode**:
|
|
|
|
- **ALIGN_BEGIN** = **0** --- Aligns children with the beginning of the container.
|
|
- **ALIGN_CENTER** = **1** --- Aligns children with the center of the container.
|
|
- **ALIGN_END** = **2** --- Aligns children with the end of the container.
|
|
|
|
Description
|
|
-----------
|
|
|
|
Arranges child controls vertically or horizontally, and rearranges the controls automatically when their minimum size changes.
|
|
|
|
Property Descriptions
|
|
---------------------
|
|
|
|
.. _class_BoxContainer_alignment:
|
|
|
|
- :ref:`AlignMode<enum_BoxContainer_AlignMode>` **alignment**
|
|
|
|
+----------+----------------------+
|
|
| *Setter* | set_alignment(value) |
|
|
+----------+----------------------+
|
|
| *Getter* | get_alignment() |
|
|
+----------+----------------------+
|
|
|
|
The alignment of the container's children (must be one of ALIGN_BEGIN, ALIGN_CENTER, or ALIGN_END).
|
|
|
|
Method Descriptions
|
|
-------------------
|
|
|
|
.. _class_BoxContainer_add_spacer:
|
|
|
|
- void **add_spacer** **(** :ref:`bool<class_bool>` begin **)**
|
|
|
|
Adds a control to the box as a spacer. If ``true``, *begin* will insert the spacer control in front of other children.
|
|
|