JadeTableCell Class

The JadeTableCell class provides access to an internally created cell object that you can use to directly reference the properties and methods of the table cell. This object is created on the first call to the Table class accessCell method or the JadeTableSheet class accessCell method for each Table control.

Using instances of the JadeTableCell class is equivalent to setting the accessMode property of the Table control to the Table.AccessMode_Cell value without having to set the row, column, or sheet property.

One JadeTableCell object only is created for each Table control, as there would be too much overhead required in creating an object for each cell. This object is a proxy object holding the reference to the cell that was last accessed by using the Table class accessCell method or the JadeTableSheet class accessCell method.

Accessing a cell by using the Table class accessCell method or the JadeTableSheet class accessCell method also sets the accessedCell property in the Table class, allowing subsequent access to that table cell.

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 and methods defined in the JadeTableCell class, see "JadeTableCell Properties" and "JadeTableCell Methods", in the following subsections.

For details about the superclass that encapsulates the behavior required to directly access the properties and methods of a table cell, see "JadeTableElement Class", later in this chapter, and for details about the table control and the constants, properties, methods, and events that it provides, see "Table Class", in Chapter 2.

JadeTableElement

(None)