ElementTree getTableCell(ElementTree tsect, Int row, Int col)
Arguments
tsect: The table header, footer or body sectionrow: The row to retrieve from (starting at 0)col: The column to retrieve from (starting at 0)
Usage
Retrieve a table cell so that content may be added to it. An Array::OutOfBounds 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 initialiseTable.