Cell Styles - Adobe GoLive CS2 Programmer's Manual

Hide thumbs Also See for GoLive CS2:
Table of Contents

Advertisement

SDK Programmer's Guide
// set the size
table.cell[i].width = 150;
table.cell[i].height = 150;
// set alignment of the embedded image
table.cell[i].textArea.selectAll();
table.cell[i].textArea.applyStyle("div align=center");
}
The tableCell object contains a
example, this inserts an <img> element in each of the table's cells:
var myTbl =
document.documentElement.getSubElement( "table" ).layout.table;
for (var i = 0; i < 10; i++ ) {
// insert an <img> element in each cell
var cellTextArea = myTbl.cell[i].textArea;
var source = "<a href=\"#picture" + i;
source += "\"><img src=\"(EmptyReference!)\"></a>";
cellTextArea.insertHTML(source);
}

Cell styles

A cell style is represented by a
information is represented as a cell-style object. The cell style affects cells in the table that uses that table
style.
You can get the cell-style object for a specific cell from that tableCell object:
tableMarkupObj
To get the cell-style for a cell at a particular location in a table, use the getCellStyleAt method of a
layout.table Object
tableMarkupObj
tableMarkupObj
To apply a style, pass this object to the tableCell object's applyStyle method:
var c =
document.documentElement.getSubElement("table").layout.table.cell[
c.applyStyle(
Adobe GoLive CS2 SDK
textArea
layout.tableCell.style
.layout.tableCell.style
or a
layout.table.style
Object:
.layout.table.getCellStyleAt(
.layout.table.style.getCellStyleAt(
tableCellStyleObj
);
Object, that you use to modify the cell's contents. For
Object. In a table-style object, each cell's style
col, row
Editing with Layout
)
col, row
)
120
n
];

Advertisement

Table of Contents
loading

Table of Contents