TX Text Control .NET for Windows Forms

Remove Method

Method|Introduced in 17.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Removes the table cell at the current text input position or all selected table cells when a text selection exists.

Syntax

public bool Remove();

Return Value

The return value is true, if table cells could be removed. Otherwise it is false.

Examples

The following example creates a small report table and works with its structure by using TableCellCollection.Remove.

textControl.Tables.Add(3, 3, 10);
Table table = textControl.Tables.GetItem(10);
TableCellCollection tableCellCollection = table.Cells;

if (tableCellCollection.Remove())
{
    Console.WriteLine("Remove completed successfully.");
}