Layout#
- class UI.Layout#
Arranges the elements of a panel automatically, so that they do not have to be positioned one by one. See
UI.Panel:add_horizontal_layout(),UI.Panel:add_vertical_layout()andUI.Panel:add_grid_layout().-
spacing:
number# The gap left between the elements, in pixels. A grid layout uses it in both directions.
- Attribute:
Can be read or written
-
padding:
UI.Padding# The gap left inside the edges of the panel.
- Attribute:
Can be read or written
-
child_alignment:
UI.TextAnchor# Where the elements are placed within the space the layout has to fill.
- Attribute:
Can be read or written
-
cell_size:
Tuple# The size of each cell of a grid layout, in pixels.
- Attribute:
Can be read or written
Note
Only applies to a grid layout. Throws an exception for the other layouts, whose elements are sized individually using their layout elements.
-
constraint:
UI.GridConstraint# What fixes the shape of a grid layout.
- Attribute:
Can be read or written
Note
Only applies to a grid layout. Throws an exception for the other layouts.
-
constraint_count:
number# The number of columns or rows that
UI.Layout.constraintfixes, ignored when the constraint isUI.GridConstraint.flexible.- Attribute:
Can be read or written
Note
Only applies to a grid layout. Throws an exception for the other layouts.
-
spacing: