HTMLDocument::getTableCell(3) Retrieve a table cell

SYNOPSIS

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)

DESCRIPTION

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)

AUTHORS

Kaya standard library by Edwin Brady, Chris Morris and others (k[email protected]). For further information see http://kayalang.org/

LICENSE

The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation.

RELATED

HTMLDocument.addTableBodySection(3kaya)

HTMLDocument.addTableColumns(3kaya)

HTMLDocument.addTableRow(3kaya)

HTMLDocument.getTableBodySections(3kaya)

HTMLDocument.makeDataCell(3kaya)

HTMLDocument.makeHeaderCell(3kaya)

HTMLDocument.getTableFooter(3kaya)

HTMLDocument.getTableHeader(3kaya)