DynaPDF Manual - Page 93

Previous Page 92   Index   Next Page 94

Tables
Page 93 of 839
Table and cell borders appear fully inside the table or cell boundary. The cell grid is no real border; it
consists of horizontal and vertical lines which are drawn in the middle of two rows or columns. The
grid lines reduce the width of columns but increase the height of rows.
The width and colors of the grid lines can be set for the entire table and for individual rows and
columns but not for cells. A grid line covers always the entire width or height of the table.
Cell spacing controls the space between cells (outer margin) and cell padding controls the space
between the cell contents and the cell boundary including borders (inner margin).
Cell spacing and cell padding can be defined for the entire table, as well as for individual columns,
rows, and cells. The properties are inherited from the table, columns, rows, and cells, in this order. If
a value is defined for the table, for a column and for a row, for example, then the value of the row
takes precedence.
Cell spacing and cell padding decrease the widths of columns but increase the height of rows. If the
available width for the contents becomes too small then the column will be expanded to the
minimum width: that is the sum of the border widths + cell spacing + cell padding + minimum width
of the cell contents. This adjustment is done for all columns if necessary. If the sum of the column
widths becomes larger as the table width then the table width is adjusted too. DrawTable() outputs a
warning if the width of one or more columns was changed.
Table border = 3 Units, Cell Border
= 2 Units
Cell Spacing = 6 Units, Cell Padding = 3 Units
1
2
3
4
5
6
7
8
9
Background Objects
A background color can be assigned to the table, columns, rows, and cells. The table has its own
background color while the background color of a cell is inherited from the column and row, in this
order.
The table and cells support also background images and templates. Background objects are not
inherited. The table and cells have its own background.
If a background color and an additional background object is defined then the table or cell is filled
with the background color before other objects are drawn.
The background area is the area inside the cell or table border. In contrast, the content area of
foreground objects is the area inside the border minus cell padding. Background objects do never
change the width or height of a cell.
 

Previous topic: Tables, General properties, Error Handling, Borders, Cell Spacing, Cell Padding

Next topic: Foreground Objects, Cell Alignment and Orientation, ColSpan, RowSpan, Page breaks