TableCellBorderRect
New in version 5.0
TableCellBorderRect ( cellIndices ; borderStroke ; borderColor ; borderColorVariant )
Argument | Type | Range | Default | Note |
---|---|---|---|---|
cellIndices | int[] | -1000..1000 | 0 | 0...all |
borderStroke | num[] | 0..1000 | 1 | Dimension:[pt] |
borderColor | rgba | 0..255 | black | |
borderColorVariant | int | -1..128 | solid |
Examples
TableCellBorderRect(1 2 1 -1;1)
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_BORDER_RECT_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 | TableColumnAlignments(right;right;right) |
6 | TableColumnWidths(0;100;80) /* 1st column: 0...automatic column width. */ |
7 | TableCellBorderRect( 1 2;1;red) /* Add border to 2nd cell of 1st row. */ |
8 | TableCellBorderRect(-2 -1;1;red) /* Add border to last cell of 2nd last row. */ |
9 | |
10 |
| TABLE_CELL_BORDER_RECT_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;Verdana;15;plain;black) /* 0..all cells. */ |
5 | TableColumnAlignments(right;right;right) |
6 | TableColumnWidths(0;100;80) /* 1st column: 0...automatic column width. */ |
7 | TableCellBorderRect(1 1 3 2;1;red) /* Add border around rows[1..3] and columns[1..2]. */ |
8 | TableCellBorderRect(-1 1 -1 -1;1;red) /* Add border to last row. */ |
9 | |
10 |