TX Text Control .NET for Windows Forms

MergeCells 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

Merges all selected table cells in this table. The Table.CanMergeCells property can be used to determine, if table cells can be merged or not.

Syntax

public bool MergeCells();

Return Value

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

Examples

The following example creates a single header cell by merging the cells in the first row.

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

table.Select(1, 1, 1, 3);
table.MergeCells();

Further Reading