Skip to content

Latest commit

 

History

History
93 lines (60 loc) · 3.76 KB

class_boxcontainer.rst

File metadata and controls

93 lines (60 loc) · 3.76 KB
github_url:hide

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:`ColorPicker<class_ColorPicker>`, :ref:`HBoxContainer<class_HBoxContainer>`, :ref:`VBoxContainer<class_VBoxContainer>`

Base class for box containers.

Description

Arranges child :ref:`Control<class_Control>` nodes vertically or horizontally, and rearranges them automatically when their minimum size changes.

Tutorials

Properties

:ref:`AlignmentMode<enum_BoxContainer_AlignmentMode>` :ref:`alignment<class_BoxContainer_property_alignment>` 0

Methods

:ref:`Control<class_Control>` :ref:`add_spacer<class_BoxContainer_method_add_spacer>` ( :ref:`bool<class_bool>` begin )

Enumerations

enum AlignmentMode:

  • ALIGNMENT_BEGIN = 0
  • ALIGNMENT_CENTER = 1
  • ALIGNMENT_END = 2

Property Descriptions

Default 0
Setter set_alignment(value)
Getter get_alignment()

The alignment of the container's children (must be one of :ref:`ALIGNMENT_BEGIN<class_BoxContainer_constant_ALIGNMENT_BEGIN>`, :ref:`ALIGNMENT_CENTER<class_BoxContainer_constant_ALIGNMENT_CENTER>`, or :ref:`ALIGNMENT_END<class_BoxContainer_constant_ALIGNMENT_END>`).

Method Descriptions

Adds a :ref:`Control<class_Control>` node to the box as a spacer. If begin is true, it will insert the :ref:`Control<class_Control>` node in front of all other children.