TXTextControl.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.


public class TableCell
[Visual Basic]
Public Class TableCell


Property Description
CellFormat Gets or sets the formatting attributes of a table cell.
Column Gets the table cell's column number.
Formula Gets or sets the table cell's formula.
Length Gets the number of characters in the table cell.
Name Gets or sets the cell's name.
Position Gets or sets, in twips, the horizontal position of the cell.
Row Gets the table cell's row number.
Start Gets the index (one-based) of the first character in the table cell.
Text Gets or sets the cell's text.
Width Gets or sets, in twips, the width of the cell.


Method Description
Select Selects the table cell.


The following example shows how to handle table cells.

TableCell myCell = myTable.Cells.GetItem(1, 1);
myCell.Width = 2 * 1440; // 2 inches
myCell.Text = "Some sample text";

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"

TextControl1.Selection.FontSize = 8 * 20 ' 8pt
TextControl1.Selection.ParagraphFormat.Alignment = HorizontalAlignment.Right

See Also