Property: | Function: |
---|---|
Padding | The padding inside the edges of the layout group. |
Cell Size | The size to use for each layout element in the group. |
Spacing | The spacing between the layout elements. |
Start Corner | The corner where the first element is located. |
Start Axis | Which primary axis to place elements along. Horizontal will fill an entire row before a new row is started. Vertical will fill an entire column before a new column is started. |
Child Alignment | The alignment to use for the layout elements if they don’t fill out all the available space. |
The Grid Layout Group component places its child layout elements in a grid. Unlike other layout groups, the Grid Layout Group ignore the minimum, preferred, and flexible size properties of its contained layout elements and instead assign a fixed size to all of them which is defined in the properties of the Grid Layout Group itself.
Note: As a layout element, the Grid Layout Group will always set its preferred width to be the width needed to have all the layout elements be positioned side by side, regardless of what the Start Axis property is set to. Since the auto layout system always evaluates widths first and heights afterwards, it’s not possible to calculate a needed width given a constrained height.