Table of Contents

Class BoxContainer

A container that arranges its child controls horizontally or vertically.

Inheritance
BoxContainer
Derived

Remarks

A container that arranges its child controls horizontally or vertically, rearranging them automatically when their minimum size changes.

See Also

Properties

alignment

The alignment of the container's children (must be one of BoxContainer.ALIGNMENT_BEGIN, BoxContainer.ALIGNMENT_CENTER, or BoxContainer.ALIGNMENT_END).

var alignment : int = 0

Property Value

int

Remarks

  • void set_alignment(int value)
  • int get_alignment

vertical

If true, the BoxContainer will arrange its children vertically, rather than horizontally.

Can't be changed when using HBoxContainer and VBoxContainer.

var vertical : bool = false

Property Value

bool

Remarks

  • void set_vertical(bool value)
  • bool is_vertical

separation

Theme Property

The space between the BoxContainer's elements, in pixels.

 = ``4``

Property Value

int

Methods

add_spacer(bool)

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

Control add_spacer(bool begin)

Parameters

begin bool