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
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++;
TextControl1.ResetContents()
Dim MyTableId As Integer = 10
TextControl1.Tables.Add(10, 3, MyTableId)
Dim MyTable As TXTextControl.Table = TextControl1.Tables.GetItem(MyTableId)
TextControl1.InputPosition = _
New TXTextControl.InputPosition(MyTable.Cells.GetItem(3, 1).Start)
If MyTable.CanSplit Then
MyTable.Split(TXTextControl.TableAddPosition.After)
End If
' Correct the table IDs after splitting the original table.
For Each MyCurrentTable As TXTextControl.Table In TextControl1.Tables
MyCurrentTable.ID = MyTableId
MyTableId = MyTableId + 1
Next
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