BoxContainer
Inherits:Container<Control<CanvasItem<Node<Object
Inherited By:HBoxContainer,VBoxContainer
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.
Tutorials
Properties
| ||
|
Methods
add_spacer(begin:bool) |
Theme Properties
|
Enumerations
enumAlignmentMode:🔗
AlignmentModeALIGNMENT_BEGIN =0
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).
AlignmentModeALIGNMENT_CENTER =1
The child controls will be centered in the container.
AlignmentModeALIGNMENT_END =2
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).
Property Descriptions
AlignmentModealignment =0
🔗
AlignmentModeget_alignment()
The alignment of the container's children (must be one ofALIGNMENT_BEGIN,ALIGNMENT_CENTER, orALIGNMENT_END).
boolis_vertical()
Iftrue
, theBoxContainer will arrange its children vertically, rather than horizontally.
Can't be changed when usingHBoxContainer andVBoxContainer.
Method Descriptions
Controladd_spacer(begin:bool)🔗
Adds aControl node to the box as a spacer. Ifbegin
istrue
, it will insert theControl node in front of all other children.
Theme Property Descriptions
The space between theBoxContainer's elements, in pixels.