Applying A Table Style Within A Table; Table Cells - Adobe GoLive CS2 Programmer's Manual

Hide thumbs Also See for GoLive CS2:
Table of Contents

Advertisement

SDK Programmer's Guide
The
app.tableStyles
This example applies one of these styles to a <table> element:
// get the table layout object
var table = document.documentElement.getSubElement("table").layout.table;
// apply a style
table.applyStyle(app.tableStyles[
You can also get a table-style object from the style property of the
particular <table> element. If you do, the xSize , ySize , numHeaderRows , numFooterRows ,
numHeaderColumns and numFooterColumns properties are read-only. Changes to the values of this
object's other properties affect the table immediately.

Applying a table style within a table

You can set properties of the table-style object to adjust the number of headers, footers, rows, and
columns to which that style is applied. If the number of rows and columns a style affects is less than the
number of rows and columns in the table that uses it, the style repeats itself in the extra rows and columns.
For example the following figures shows a style that affects two rows and two columns, as indicated by the
blue lines bracketing the 2x2-cell area at the upper-left of the style preview area. When applied to this
four-row by four-column table with no headers and footers, the style is repeated four times, for each 2x2
block of cells.

Table cells

The
layout.table Object
Objects that manage individual cells in the table. You can retrieve members of this collection by name or
by index from the cell property:
document.documentElement.getSubElement("table").layout.table.cell[n];
Set tableCell properties to modify the cell's appearance, such as its background color or image, size,
and alignment options:
// get the TableLayout object
var table =
document.documentElement.getSubElement("table").layout.table;
// scale up the table cells
for (var i = 0; i < 10; i++) {
Adobe GoLive CS2 SDK
property holds a collection of table-style objects for every available table style.
that manages a <table> element provides a collection of
styleNameOrNum
]);
layout.table Object
Editing with Layout
119
that manages a
layout.tableCell

Advertisement

Table of Contents
loading

Table of Contents