accessCell

accessCell(row:    Integer;
           column: Integer): JadeTableCell;

The accessCell method of the Table class returns a reference to the JadeTableCell object for the requested row and column (specified in the row and column parameters) for the current topSheet of the table.

Accessing a cell using this method or the JadeTableSheet class accessCell method sets the corresponding Table class accessedCell property to the returned cell so that it can be used for subsequent access.

The following code fragments show the use of the accessCell method.

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";

Your logic must delete cloned cells.

See also the Table class accessColumn, accessRow, and accessSheet methods.