Split Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Splits a table below or above the current input position. If the table does not contain the current input position it cannot be split. The Table.CanSplit property can be used to determine if a table can be split or not. If a table is split above the first row a new line is inserted above the table and if a table is split below the last row a new line is inserted below the table. This is useful to insert text above or below a nested table that immediately starts and/or ends at the beginning or the end of the cell in which it is nested.
Syntax
public bool Split(TableAddPosition position);Public Function Split(position As TableAddPosition) As BooleanParameters
| Parameter | Description | ||||||
|---|---|---|---|---|---|---|---|
| position | Specifies the position where to split the table. It can be one of the TableAddPosition values:
|
Return Value
The return value is true, if the table could be split. Otherwise it is false.
Examples
The following example splits a table after its second row.
textControl.Tables.Add(4, 3, 10);
Table table = textControl.Tables.GetItem(10);
textControl.InputPosition =
new InputPosition(table.Cells.GetItem(2, 1).Start);
table.Split(TableAddPosition.After);textControl.Tables.Add(4, 3, 10)
Dim table As Table = textControl.Tables.GetItem(10)
textControl.InputPosition =
New InputPosition(table.Cells.GetItem(2, 1).Start)
table.Split(TableAddPosition.After)