Online Documentation for Advanced PDF Generator for RAD Studio

TRenderCell.AddParagraph


function AddParagraph: TRenderCell;

 

Description

Use this method to add a paragraph to a cell. Technically, if the cell has no paragraphs, this method creates a table within the cell and returns the first cell in the first row of the created table. If the cell already has paragraphs, the method adds a row to the inner table and returns the first cell in its last row.

 

Note: If you want to add a mixed content to a cell, always use AddParagraph before each new object, i.e. if you want to add two tables and a text to the table cell, use the following code:

 

Cell.AddParagraph; 

Cell.AddTextItem(Table1);

Cell.AddParagraph;

Cell.AddText('Text', Font, TextAlignment);

Cell.AddParagraph;

Cell.AddTextItem(Table2);

 

If you will skip the first row, then the second AddParagraph will create a new row in the Table1 table and the document appearance will become incorrect. So be careful when using mixed content in a single cell.

 


See also:

AddItem

AddText

AddTextItem