WPTable API

The WPTable class defines API methods and properties that specify the appearance of a table and provide access to the cells it contains. To get or set the text and alignment of individual cells, use the properties provided by the WPTableCell class. The methods and properties for WPTable are listed below in the following categories:

Table and border widths

These properties specify the width of the table and the border around it.
void  setTableWidth(int)
int  getTableWidth()
void  setBorderWidth(int)	/* Specify 0 for no border.  */
int  getBorderWidth()

Cell access

These methods return a reference to a particular cell or a reference to the Enumerator that lists all the cells in the table.
Enumerator  enumerateCells()
WPTableCell  findTableCell(String name)
WPTableCell  findTableCell(int row, int column)

Cell spacing and padding

These properties specify the spacing between cells and within cells.
void  setCellSpacing(int)  /* Sets the amount of space between cells. */ 
int  getCellSpacing()  /* Gets the amount of space between cells. */
void  setCellPadding(int)  /* Set a margin inside the cells.  [[PS: Is it a left margin?]] */
int  getCellPadding()  /* Get the internal margin for the cells.  */

Text alignment

These properties set the horizontal and vertical alignment for all cells in the table.
void  setAlignment(String align)	/*  The valid values are left, right, or center.  */
String  getAlignment()	/*  Returns left, right, or center.  */
void  setVAlign(String align)  /* The valid values are  top, middle, or bottom. */
String  getVAlign()  /* Returns  top, middle, or bottom. */

Row and column operations

These methods insert and delete rows and columns, and return the number of rows and columns in the table.
[[PS: I assume that row and column numbering begins at 1. So that 1,1 = row 1, column 1. Is this correct?]]
boolean  insertRow(int beforeRow)	/* Inserts a row above the row you specify. [[PS: Is this right?]] */
boolean  insertColumn(int beforeColumn)	/* Inserts a column to the left of the column you specify. [[PS: Is this right?]] */
boolean  deleteRow(int row)	/* Deletes the row you specify.  */
boolean  deleteColumn(int column)	/* Deletes the column you specify.  */
int  getRowCount()
int  getColumnCount()  
See also
WordProcessor API Index
WordProcessor Object Model
WordProcessor Home Page