The
The JadeTableElement class encapsulates the behavior required to directly access the properties and methods of a table object (that is, a cell, column, row, or sheet) without using the
Using instances of the JadeTableElement subclasses is equivalent to setting the
JadeTableElement Subclass | Equivalent to the accessMode Value for the Table class… |
---|---|
JadeTableCell | Table.AccessMode_Cell |
JadeTableColumn | Table.AccessMode_Column |
JadeTableRow | Table.AccessMode_Row |
JadeTableSheet | Table.AccessMode_Sheet |
As the overhead required to create an object for each cell, column, row, and sheet of the table would be too great, only one object of each type is created. These objects are proxy objects that hold a reference to the cell, column, row, or sheet that was last accessed by using the methods listed below. Accessing a cell, column, row, or sheet sets a corresponding property in the
The following code fragments show examples of accessing the last table elements that were accessed.
table1.accessCell(2, 3).inputType := Table.InputType_TextBox; table1.accessedCell.foreColor := Red; table1.accessSheet(2).accessCell(1, 4).text := "Company"; table1.accessedCell.alignment := Table.Alignment_Right_Middle;
Storing a reference to a returned cell causes problems unless you take a copy of that cell, as shown in the following example in which both cell1 and cell2 refer to the same object, which is referencing cell(3, 4).
cell1 := table1.accessCell(2, 3); cell2 := table1.accessCell(3, 4); cell1.text := "abc";
In the following example, cell1 has been cloned and still refers to cell(2, 3).
cell1 := table1.accessCell(2, 3).cloneSelf(true); // the cloned cell must be deleted by your logic cell2 := table1.accessCell(3, 4); cell1.text := "abc";
For details about the properties defined in the JadeTableElement class, see "JadeTableElement Properties", in the following subsection. For details about the table control and the constants, properties, methods, and events that it provides, see "
JadeTableCell, JadeTableColumn, JadeTableRow, JadeTableSheet