Description
Fill color of the tabulation row for all cells of specified row type in a table.
It can be superseded by the FillColorName property on a cell level.
Syntax
object.CellColor (iRowType) [ =sColor ] |
object
Required. Object name, returned by Text.GetNewTable or Text.GetCurTable.
iRowType
0 = Odd (defrow 0), 1 = First (defrow -2), 2 = Last (defrow -3), 3 = Even (defrow -1).
Please note that if you want to set the same values for entire table, use iRowType = 0, that corresponds to odd rows, but if it's only specified, than it sets all row types.
sColor
Color string.
Examples
This script creates a new table with 4 columns and 8 rows, first row filled with K color, even rows with M, odd rows with C and last row with Y, and with gray values of 60, 90, 50, 30 respectively. Dim oT = Text.GetNewTable oT.NColumns = 4 oT.NRows = 8 oT.CellColor(0) = "C" ' odd rows oT.CellColor(1) = "K" ' first oT.CellColor(2) = "Y" ' last oT.CellColor(3) = "M" ' even oT.CellGray(0) = 60 ' odd rows oT.CellGray(1) = 90 ' first oT.CellGray(2) = 50 ' last oT.CellGray(3) = 30 ' even Text.InsTable (oT) |
This script modifies an existing table, setting the first ro Dim oT = Text.GetCurTable oT.CellColor(0) = "K" ' odd rows oT.CellGray(0) = 20 oT.CellColor(1) = "" ' first row oT.CellGray(1) = 0 oT.CellColor(2) = "" ' last row oT.CellGray(2) = 0 oT.CellColor(3) = "" ' even rows oT.CellGray(3) = 0 Text.UpdateTable (oT)
This script edits an existing table setting first row filled with K color, even rows with M, odd rows with C and last row with Y, and with gray values of 60, 90, 50, 30 respectively. Dim oT = Text.GetCurTable oT.CellColor(0) = "C" ' odd rows oT.CellColor(1) = "K" ' first oT.CellColor(2) = "Y" ' last oT.CellColor(3) = "M" ' even oT.CellGray(0) = 60 ' odd rows oT.CellGray(1) = 90 ' first oT.CellGray(2) = 50 ' last oT.CellGray(3) = 30 ' even Text.UpdateTable (oT) |
See also