DynaPDF Manual - Page 132
Previous Page 131 Index Next Page 133

Table Functions
Page 132 of 883
tcGridHorzColor = 2, // Table
-> default black
tcGridVertColor = 3, // Table
-> default black
tcTextColor
= 4
// Table, Columns, Rows, Cells -> default black
}TTableColor;
The function sets or changes the specified color and color space. The number of color components
must match the number of components of the color space. The text color is inherited from the table,
column, and row, in this order. The border color is inherited from columns and rows but not from
the table since the table has its own border.
Extended color spaces will be deleted when the PDF file in memory is closed or when FreePDF() was
called. The color spaces must be recreated when the table should be drawn in another PDF file. Color
space handles may change when recreated in another PDF file. All such colors should be set again to
avoid issues with invalid color space handles.
Width exception of Lab colors, color values are in the range 0 through 1. Lab colors support different
ranges for the L*, a*, and b* components:
L* ->
0 .. 100
a* -> -128 .. 127
b* -> -128 .. 127
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SetColOrRowSpan
Syntax:
LBOOL tblSetColOrRowSpan(
const ITBL* Table,
// Table pointer
UI32 Row,
// Row index
UI32 Col,
// Column index
UI32 Value,
// Col or row span (must be greater 1)
LBOOL IsColSpan)
// If true, col span is set, row span otherwise
The function sets col or row span for a specific cell. The parameter Value must be greater 1 and Row
and Col must be valid row and column indexes.
Contents of spanned cells will be deleted. Only contents of the cell that defines col or row span is
drawn.
It is allowed to set Value to a higher value than columns or rows are currently available. The value is
adjusted to the valid range when the table is drawn or when the height is calculated.
Note that spanned cells cannot overlap. The function checks whether col or row span was already
defined in the desired range.
Previous topic: SetColor, SetColorEx
Next topic: Row span and page breaks, SetColWidth