Add Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Adds a new table at the current text input position.
Syntax
Add()
Opens a dialog box and, when left with Ok, adds a new table with the specified attributes.
public bool Add();Public Function Add() As BooleanAdd(int, int)
Adds a new table at the current text input position. The new table has the specified number of rows and columns.
public bool Add(int rows, int columns);Public Function Add(rows As Integer, columns As Integer) As Boolean| Parameter | Description |
|---|---|
| rows | Specifies the number of rows the table consists of. |
| columns | Specifies the number of columns the table consists of. |
Add(int, int, int)
Adds a new table at the current text input position. The new table has the specified number of rows and columns. The specified identifier can be used to get the table from the collection.
public bool Add(int rows, int columns, int id);Public Function Add(rows As Integer, columns As Integer, id As Integer) As Boolean| Parameter | Description |
|---|---|
| rows | Specifies the number of rows the table consists of. |
| columns | Specifies the number of columns the table consists of. |
| id | Specifies the table's id. |
Return Value
The return value is true, if the table could be added. Otherwise it is false.
Examples
The following example works with tables in the current document by using TableCollection.Add.
TableCollection tableCollection = textControl.Tables;
if (!tableCollection.Add(1, 1, 100))
{
throw new InvalidOperationException("The item could not be inserted.");
}Dim tableCollection As TableCollection = textControl.Tables
If Not tableCollection.Add(1, 1, 100) Then
Throw New InvalidOperationException("The item could not be inserted.")
End If