Description
Maximum space that can be added above the text of the tabulation cells when vertically justifiyng the cells themselves.
See also BottomAdd for space below, and Add for row-level.
Syntax
object.TopAdd(iRowType) [ =mValue | strValue ] |
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.
mValue
Value of space, in millipoints not greater than 65000 = 65pt
strValue
Value of space as one of the five special 'infinite' values: InfA = 65531, InfB = 65532, InfC = 65533, InfD = 65534, InfE = 65535
Example
This script creates a new table with 4 columns and 8 rows, and the maximum space that can be added above the text of the tabulation cells when vertically justifying the cells themselves is set as 1pt for all cells in odd rows, 2pt for for all cells in the first row, 3pt for for all cells in the last row, 4pt for for all cells in even rows: Dim oTable = Text.GetNewTable otable.NColumns = 4 oTable.NRows = 8 oTable.TopAdd(0) = units.toval("1pt") ' odd rows, defcell 0 after defrow 0 oTable.TopAdd(1) = units.toval("2pt") ' first row, defcell 0 after defrow -2 oTable.TopAdd(2) = units.toval("3pt") ' last row, defcell 0 after defrow - 3 oTable.TopAdd(3) = units.toval("4pt") ' even rows, defcell 0 after defrow -1 Text.InsTable (oTable) |
This script edits the current table setting the maximum space that can be added above the text of the tabulation cells when vertically justifying the cells themselves as 11pt for for all cells in odd rows, 12pt for for all cells in the first row, 13pt for for all cells in the last row, 14pt for for all cells in even rows: Dim oTable = Text.GetCurTable oTable.TopAdd(0) = units.toval("11pt") ' defcell 0 after defrow 0 oTable.TopAdd(1) = units.toval("12pt") ' defcell 0 after defrow -2 oTable.TopAdd(2) = units.toval("13pt") ' defcell 0 after defrow - 3 oTable.TopAdd(3) = units.toval("14pt") ' defcell 0 after defrow -1 Text.UpdateTable (oTable) |
See also
Add and Sub for the justification of whole text on the table level.
BottomAdd for the vertical justification of cells on the table level.
TopAdd and BottomAdd on the cell level.