A CDMLTable consists of rows and columns. The rows are numbered from top to bottom, with the top row being 0. The columns are numbered from left to right, with the leftmost column being 0.
By default, the intersection of a row and a column is a cell. You may create cells that span multiple rows and/or columns with CDMLTable.setCell.
The styles of a cell, such as its background color, font, etc., are determined using the following order.
For any style attribute (eg. background color):
- The TextBox object representing the cell (obtained using CDMLTable.getCell) is examined to see if the attribute is defined. If it is defined, its value is used.
- The TextBox objects representing the prototype of the cells in the column and row of the cell (obtained using CDMLTable.getColStyle and CDMLTable.getRowStyle) are examined to see if the attribute is defined. If the attribute is defined, its value is used. If the attribute is defined in both the column and row prototypes, the prototype that is created later will take precedence.
- The attribute is taken from the TextBox object representing the prototype of all cells (obtained using CDMLTable.getStyle).
Method | Inherited | Description |
---|---|---|
setPos | (Self) | Sets the position of the table. |
setText | (Self) | Puts text into a cell in the table. |
setCell | (Self) | Sets the number of rows and columns that a cell spans, and puts text in the cell. |
insertCol | (Self) | Inserts a column to the table. |
appendCol | (Self) | Appends a column to the right of the table. |
getColCount | (Self) | Gets the number of columns in the table. |
insertRow | (Self) | Inserts a row to the table. |
appendRow | (Self) | Appends a row to the bottom of the table. |
getRowCount | (Self) | Gets the number of rows in the table. |
getCell | (Self) | Gets the TextBox object that represents a cell. |
getColStyle | (Self) | Gets the TextBox object that represents the prototype of the cells in a column. |
getRowStyle | (Self) | Gets the TextBox object that represents the prototype of the cells in a row. |
getStyle | (Self) | Gets the TextBox object that represents the prototype of the cells in the table. |
layout | (Self) | Lays out the table. |
getColWidth | (Self) | Gets the width of a column. |
getRowHeight | (Self) | Gets the height of a row. |
getWidth | (Self) | Gets the width of the table. |
getHeight | (Self) | Gets the height of the table. |
setZOrder | (Self) | Sets the z-order (drawing order) of the table. |