Contents
- Index
- Previous
- Next
InsertTable method
Declaration
function InsertTable(NumRows, NumCols: Integer; const Caption: WideString = ''): Boolean;
Description
Inserts a table.
The method inserts a <TABLE> element with the specified number of <TR> and <TD> elements at the insertion point. If text is selected, the new table replaces the text. Tables can be inserted inside existing tables.
To change the default attributes of a new table, setup the TableAttrs and TableCellAttrs properties before calling the method.
Returns True if a table was inserted. The table is inserted even if there is a selection, and even if the selection includes a control, image, or table, including the whole document.
Returns False on failure, or if the selection is an element that cannot be replaced with a table, including another table, a control, an image, and so on.