The <grid> Tag

The <grid> tag creates a container for other components. The components are displayed in a grid with the given number of rows and columns. Components are added to the uppermost available row from left-to-right. If there are more cells in the grid than components, the remaining cells are left blank.

Every cell in a grid is exactly the same size. Components in a grid will be resized to fit perfectly within their cell.

Parameters

Name Description Legal Values Default
cols

The number of columns in the grid.

any positive integer

1

rows

The number of rows in the grid.

any positive integer

1

Also see common parameters .

Contents

The grid tag contains tags representing the components that should be added to the grid.

Example

<xmllayout>
<grid rows="3" cols="3">
   <label text="All the components" bordertitle="Cell 1"/>
   <label text="in a grid" bordertitle="Cell 2"/>
   <label text="are" bordertitle="Cell 3"/>
   <label text="the" bordertitle="Cell 4"/>
   <label text="same" bordertitle="Cell 5"/>
   <label text="size" bordertitle="Cell 6"/>
   <label text="no matter what they are." bordertitle="Cell 7"/>
   <component id="DAG" bordertitle="Cell 8"/>
</grid>

</xmllayout>