Class reference

GridContainer

Inherits Container

A container that arranges its child controls in a grid layout.

Description

GridContainer arranges its child controls in a grid layout. The number of columns is specified by the columns property, whereas the number of rows depends on how many are needed for the child controls. The number of rows and columns is preserved for every size of the container. Note: GridContainer only works with child nodes inheriting from Control. It won't rearrange child nodes inheriting from Node2D.

Properties

int columns = 1

The number of columns in the GridContainer. If modified, GridContainer reorders its Control-derived children to accommodate the new layout.

Theme properties

int h_separation = 4

The horizontal separation of child nodes.

int v_separation = 4

The vertical separation of child nodes.

Tutorials

Source revision 5592dc3a7a61
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.