An instance of the Table class represents a table in a Text Control document. It can be obtained from the document's table collection.
public class Table
The following example shows how to split a table.
textControl1.ResetContents();
int myTableId = 10;
textControl1.Tables.Add(10, 3, myTableId);
TXTextControl.Table myTable = textControl1.Tables.GetItem(myTableId);
textControl1.InputPosition =
new TXTextControl.InputPosition(myTable.Cells.GetItem(3, 1).Start);
if (myTable.CanSplit)
myTable.Split(TXTextControl.TableAddPosition.After);
// Correct the table IDs after splitting the original table.
foreach (TXTextControl.Table myCurrentTable in textControl1.Tables)
myCurrentTable.ID = myTableId++;
Method | Description |
---|---|
Merge |
Merges all selected table cells in this table. |
Select | Selects the table or a part of the table. |
Split | Splits a table below or above the current input position. |
Split |
Splits all selected table cells in this table. |
Property | Description |
---|---|
Can |
Checks whether table cells can be merged. |
Can |
Checks whether this table can be split. |
Can |
Returns true, if the currently selected table cells are merged. |
Cells | Gets a collection of all table cells the table consists of. |
Columns | Gets a collection of all columns the table consists of. |
ID | Gets or sets the table's identifier. |
Nested |
Gets the nested level for the specified table. |
Nested |
Gets a collection of all tables nested in this table. |
Outer |
Gets a table's outermost table. |
Outer |
Gets a table's outer table. |
Rows | Gets a collection of all rows the table consists of. |
Learn more about the TXText