TableCell Object

Represents a single cell in a table, which follows reference semantics, ie: changes to the cell’s properties will change the table itself. Cells always track their original row/column indexes, even if cells are added or removed from the table.

Some table cells are spanning cells, in that they span multiple rows and/or columns. The additional row/columns these cells span are said to be spanned cells. Those spanned cells still exist and can be manipulated, but they display no unique content of their own; they simply act to reserve space for the spanning cell.

Normal Cell

Normal Cell

Normal Cell

Normal Cell

Spanning Cell

2x2

Spanned Cell

Normal Cell

Spanned Cell

Spanned Cell

TableCell Object Properties

.table v2.0.5

Returns the Table object the cell is contained inside.

.row v2.0.5

Returns the row index of the cell inside its table.

.column v2.0.5

Returns the column index of the cell inside its table.

.isValid v2.0.5

Returns @true if the cell’s row and column are still valid within its table, otherwise @false.

.rowSpan v2.0.5

Returns the number of rows the cell spans. 

If the cell is not a spanning cell, returns 1. If the cell is a spanned cell, returns 0.

.columnSpan v2.0.5

Returns the number of columns the cell spans. 

If the cell is not a spanning cell, returns 1. If the cell is a spanned cell, returns 0.

.isSpanned v2.0.5

Returns @true if the cell is spanned, ie: has no unique text content of its own to display.

.spanningCell v2.0.5

Returns a TableCell object for the cell that spans this cell. If the cell is a normal cell or a spanning cell itself, just returns the same cell object.

.hasText v2.0.5

Returns @true if the cell has its own unique text content to display, or @false if the cell just reserves space for a spanning cell.

.text v2.0.5

Returns the Text object that holds the content for the cell. Note: the returned text object follows reference semantics, ie: changes to it will change the contents of the document itself.

.shadingAttributes v2.0.7

Returns a ShadingAttributes object describing how the cell background is filled. The returned object follows value semantics, ie: changes to it will not automatically update the cell.

.lineAttributesForEdge edgeName v2.0.5

Returns a LineAttributes object describing the appearance of the given cell edge. The returned object follows value semantics, ie: changes to it will not automatically update the cell.

Edge names are: "top", "bottom", "left", "right", "slashleft", "slashright". You may also use the synonym "/" for "slashleft", or "\" for "slashright". If you give an invalid edge name, this returns the @undefined value.

.setLineAttributesForEdges lineAttrs, edgeNames v2.0.5

Changes the appearance of one or more cell edges to the given LineAttributes object. The edge names can be one or more of the names given in the lineAttributesForEdge command separated by commas.

.paddingForEdge edgeName v3.0

Returns the padding (in points) for the given cell edge. Edge names are: "top", "bottom", "left", or "right".  If you give an invalid edge name, this returns the @undefined value.

.setPaddingForEdges padding, edgeNames v3.0

Changes the padding (in points) of one or more cell edges. The edge names can be one or more of the names given in the paddingForEdge command separated by commas.


Previous Chapter
Table Object
<<  index  >>
 
Next Chapter
ShadingAttributes Object