Changes

Jump to: navigation, search

XUL:Grid

28 bytes removed, 19:12, 27 March 2009
no edit summary
In this example, a grid of two columns and three rows is defined.
<pre>
<grid>
<columns>
</rows>
</grid>
</pre>
The first <row> element has two children. The first child, the <label>, specifies the content for the first column in that row, while the second child, the <button>, specifies the content for the second column. The second row behaves similarly.
Cell content may be defined in both the columns and rows of a grid as in the following example:
<pre>
<grid>
<columns>
</rows>
</grid>
</pre>
The first column defines a label to appear in the first cell (in the first row) and a textbox to appear in the second cell within that column (and thus appears in the second row). However, the two rows also define content to appear in these cell positions. The result is that both elements become part of the cell, and will both be rendered at the same location in the cell. The order is determined by whether the columns or rows is rendered first in the grid, as described earlier.
The width of the grid is determined by the larger of:
- *the smaller of the width and maxwidth of the grid element - *the minwidth of the grid element - *the smaller of the width and maxwidth of the columns element (not needed) - *the minwidth of the columns element (not needed) - *the smaller of the width and maxwidth of the specific column element (not needed) - *the minwidth of the specific column element (not needed) - *the smaller of the width and maxwidth of the rows element (not needed) - *the minwidth of the rows element (not needed) - *total used width of the content in the cells of the column including special rows and columns
The height of the grid is determined by the larger of:
- *the smaller of the height and maxheight of the grid element - *the minheight of the grid element - *the smaller of the height and maxheight of the columns element (not needed) - *the minheight of the columns element (not needed) - *the smaller of the height and maxheight of the specific column element (not needed) - *the minheight of the specific column element (not needed) - *the smaller of the height and maxheight of the rows element (not needed) - *the minheight of the rows element (not needed) - *total used height of the content in the cells of the column including special rows and columns
The align, pack and orient attributes have no effect on the grid element.
287
edits

Navigation menu