TableCellStyle
New in version 5.0
TableCellStyle ( cellIndices ; fontName ; textSize ; textStyle ; textColor ; hAlignment ; vAlignment )
Argument | Type | Range | Default | Note |
---|---|---|---|---|
cellIndices | int[] | -1000..1000 | 0 | 0...all |
fontName | str | 0..1000 | ApplFont | |
textSize | num | 0..1000 | 9 | Dimension:[pt] |
textStyle | int | 0..7 | plain | |
textColor | rgba | 0..255 | black | |
hAlignment | int | 0..3 | 0 | 0...automatic |
vAlignment | int | 0..3 | 0 | 0...automatic |
Examples
TableCellStyle(0;Verdana;15;plain;black) /* 0..all cells. */
TableCellStyle(1 2 1 -1;Arial;15;plain;white)
Description
Cells are referenced by the row and column index. For example:
TableCellBackground( 5 3;yellow) /* Cell in row 5, column 3. */
TableCellBackground( 5 -1;yellow) /* Cell in row 5, last column. */
TableCellBackground(-1 -1;yellow) /* Cell in last row, last column. */
TableCellBackground( 5 -2;yellow) /* Cell in row 5, second last column. */
TableCellBackground(-3 -2;yellow) /* Cell in third last row, second last column. */
A range of cells is referenced by listing the upper-left cell of the range, followed by the lower-right cell, i.e. [fromRow fromColumn toRow toColumn ... ]. For example:
TableCellBackground( 1 2 3 2;yellow) /* Range from cell(1,2) to cell(3,2). */
TableCellBackground( 1 1 1 -1;yellow) /* Row 1. */
TableCellBackground( 2 1 2 -1;yellow) /* Row 2. */
TableCellBackground( 2 1 5 -1;yellow) /* Rows 2 to 5. */
TableCellBackground(-1 1 -1 -1;yellow) /* Last row. */
TableCellBackground(-2 1 -1 -1;yellow) /* Last 2 rows. */
TableCellBackground(1 1 -1 1;yellow) /* Column 1. */
TableCellBackground(1 2 -1 2;yellow) /* Column 2. */
TableCellBackground(1 2 -1 5;yellow) /* Column 2 to 5. */
TableCellBackground(1 -1 -1 -1;yellow) /* Last column. */
TableCellBackground(1 -2 -1 -1;yellow) /* Last 2 columns. */
Multiple cell ranges can be defined in one function call. For example:
TableCellBackground(1 1 1 -1 /* First row. */
-1 1 -1 -1;yellow) /* Last row. */
TableCellBackground(1 1 -1 1 /* First column. */
1 -1 -1 -1;yellow) /* Last column. */
Short form:
0...means all cells. For example:
TableCellBackground(0;yellow) /* All rows and columns. */
| TABLE_CELL_STYLE_01 |
1 | OpenDrawing(300;130) |
2 | |
3 | TableTexts("";"10\t1,234.21\t712\n25\t93.42\t3949\n268\t234.20\t6854\n185\t-1,692.21\t•••\n124\t198.50\t1000") |
4 | TableCellStyle(0;Verdana;15;plain;black) /* 0..all cells. */ |
5 | TableCellStyle(4 2;Verdana;15;plain;red) /* Cell[4;2] in red. */ |
6 | TableColumnAlignments(right;right;right) |
7 | TableColumnWidths(0;100;80) /* 1st column: 0...automatic column width. */ |
8 | |
9 |
| TABLE_CELL_STYLE_02 |
1 | OpenDrawing(300;130) |
2 | |
3 | TableTexts("";"10\t1,234.21\t712\n25\t93.42\t3949\n268\t234.20\t6854\n185\t-1,692.21\t•••\n124\t198.50\t1000") |
4 | TableCellStyle(0;Times;15;plain;black) /* 0..all cells. */ |
5 | TableCellStyle(1 -1 -1 -1;Verdana;13;plain;red) /* Last column in red. */ |
6 | TableColumnAlignments(right;right;right) |
7 | TableColumnWidths(0;100;80) /* 1st column: 0...automatic column width. */ |
8 | |
9 |