Table

The <table> tag is a powerful way to display tabular data. Like in HTML each row of the table need to be described by <tr> and every column by <td>.

It can only be used within a <body>.

Example

<table 
  align="left" 
  fontSize="20" 
  spaceAfter="30" 
  widths="2.5cm 3cm 3cm"
  backgroundColor="red"
>
  <tr>
    <td><text><b>#</b></text></td>
    <td><text><b>First Name</b></text></td>
    <td><text><b>Last Name</b></text></td>
  </tr>
  <tr>
    <td>1</td>
    <td>Thorben</td>
    <td>Croisé</td>
  </tr>
  <tr backgroundColor="red">
    <td>2</td>
    <td backgroundColor="pink">Tijana</td>
    <td backgroundColor="pink">Bambole</td>
  </tr>
</table>

Attributes

class (optional)

The styleclass to be applied to all content

widths (optional)

The widths property allows you to finely control the widths of the table columns. Add a space separated list of widths per column here, e.g. "1cm 15mm 6cm 22mm"

backgroundColor (optional) New in Atfinity 15

The table's background color, while rows (<tr>) and cells (<td>) can have their own background colors, overriding higher-level settings.

borderWidth (optional) New in Atfinity 15

The width of the table border in pt . The default value is 1

borderColor (optional) New in Atfinity 15

The color of the table border. The default value is "black".

cellPadding (optional) New in Atfinity 15

The padding of the cells. Behaves like the css property padding, so you can give values in the trouble notation. For example: A single value like "3" will set the padding to 3pt on all sides, two values like "1cm 3cm" will set the padding to 1cm top and bottom and 3cm left and right. Four properties set all sides, e.g. "1 2 3 4" will set the cell padding to 1pt top, 2pt right, 3pt bottom and 4pt left (TRouBLe = Top Right Bottom Left)

Last updated

Was this helpful?