AddTable Method |
[Top] [Chapter] [Previous] [Next] |
Create a table and use callback event Applies to Declaration procedure AddTable(const TableName: WideString; ColCount: Integer; RowCount: Integer; Border: WordBool; EventParam: Integer; CreateHeader: WordBool; CreateFooter: WordBool); Description This method creates a table and triggers the callback OnCreateNewCell for each created cell if EventParam was passed with a value != 0. So you can add the data and properties is a very efficient way.
Since the cursor will be placed inside the first cell, you can, in case it is not possible to use the event, fill text in each new cell by moving the cursor through the table using CPMoveNextCell and CPMoveNextRow. To create text after the table use ExitTable or InputParagraph(2,"") !
Tip: You can use the methods ASetCellProp and ASetCellStyle to quickly modify the properties, text and styles of certain cells in an existing table. Category |