TX Text Control .NET for WPF

TableColumn Class

Class
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.dll
Install
dotnet add package TXTextControl.TextControl.WPF.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.dll from the setup.

Description

An instance of the TableColumn class represents a single column of a table in a Text Control document. It can be obtained from the table's column collection.

Syntax

public class TableColumn

Examples

The following example shows how to handle table columns.

TXTextControl.TableColumn myCol = myTable.Columns.GetItem(1);
int myDelta = (int)(myCol.Width / 5);
myCol.Width -= myDelta;
myCol.Position += myDelta;

The following example creates a small report table and works with its structure.

textControl.Tables.Add(3, 3, 10);
Table table = textControl.Tables.GetItem(10);
TableColumn tableColumn = table.Columns[2];

Members

Properties

PropertyDescription
CellFormatGets or sets the formatting attributes of a table column. The property's value is an object of the type TableCellFormat.
ColumnGets the number of the table column represented through this table column object.
PositionGets or sets, in twips, the horizontal position of the column.
WidthGets or sets, in twips, the width of the column. If the cells of the column have different widths, the property returns 0.

Methods

MethodDescription
SelectSelects the table column.