HTMLDocument.getTableCell3kaya
Retrieve a table cell
Usage
ElementTree getTableCell( ElementTree tsect, Int row, Int col )
Arguments
tsect The table header, footer or body section
row The row to retrieve from (starting at 0)
col The column to retrieve from (starting at 0)
Overview
Retrieve a table cell so that content may be added to it. An Array.OutOfBounds (3kaya) Exception will be thrown if the row and column are not within the table.
-
table = addTable(parent,"Example table");
tbody = addTableBodySection(table);
for i in [0..2] {
void(addTableRow(tbody));
}
addTableColumns(table,3);
for i in [0..2] {
for j in [0..2] {
td = getTableCell(tbody,i,j);
addString(td,String(i+j));
}
}
/*
Example table
+---+---+---+
| 0 | 1 | 2 |
+---+---+---+
| 1 | 2 | 3 |
+---+---+---+
| 2 | 3 | 4 |
+---+---+---+
*/
Naturally, the table in this simple example would be easier to generate using HTMLDocument.initialiseTable (3kaya)
Releases
4 releases since Debian 5.0 (Lenny); the text changed 3 times.