TX Text Control .NET for Windows Forms Documentation

TableCell Class

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

Syntax

[C#] public class TableCell
[Visual Basic] Public Class TableCell

Properties

PropertyDescription
CellFormatGets or sets the formatting attributes of a table cell.
ColumnGets the table cell's column number.
LengthGets the number of characters in the table cell.
NameGets or sets the cell's name.
PositionGets or sets, in twips, the horizontal position of the cell.
RowGets the table cell's row number.
StartGets the index (one-based) of the first character in the table cell.
TextGets or sets the cell's text.
WidthGets or sets, in twips, the width of the cell.

Methods

MethodDescription
SelectSelects the table cell.

Example

The following example shows how to handle table cells.

[C#] TableCell myCell = myTable.Cells.GetItem(1, 1); myCell.Width = 2 * 1440; // 2 inches myCell.Text = "Some sample text"; myCell.Select(); textControl1.Selection.FontSize = 8 * 20; // 8pt textControl1.Selection.ParagraphFormat.Alignment = HorizontalAlignment.Right;
[Visual Basic] Dim MyCell As TableCell = MyTable.Cells.GetItem(1, 1) MyCell.Width = 2 * 1440 ' 2 inches MyCell.Text = "Some sample text" MyCell.Select() TextControl1.Selection.FontSize = 8 * 20 ' 8pt TextControl1.Selection.ParagraphFormat.Alignment = HorizontalAlignment.Right

See Also

 
 
 

Products

Support

Downloads

Corporate

Buy Now