Class reference

BoxContainer

Inherits Container

A container that arranges its child controls horizontally or vertically.

Description

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

Properties

Methods

Control add_spacer(bool begin)

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.

Constants

ALIGNMENT_BEGIN = 0

Enum: AlignmentMode

The child controls will be arranged at the beginning of the container, i.e. top if orientation is vertical, left if orientation is horizontal (right for RTL layout).

ALIGNMENT_CENTER = 1

Enum: AlignmentMode

The child controls will be centered in the container.

ALIGNMENT_END = 2

Enum: AlignmentMode

The child controls will be arranged at the end of the container, i.e. bottom if orientation is vertical, right if orientation is horizontal (left for RTL layout).

Theme properties

int separation = 4

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

Tutorials

Source revision 4f5b14abade2
Connection interrupted. Reload×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.