An instance of the TableCellFormat class represents the formatting attributes of a table cell.

Syntax

public class TableCellFormat
Public Class TableCellFormat

Examples

The following example shows how to format a table cell.

TXTextControl.TableCellFormat myCellFormat = new TXTextControl.TableCellFormat();

myCellFormat.BackColor = System.Drawing.Color.LightBlue;
myCellFormat.BottomBorderWidth = 150;
myCellFormat.VerticalAlignment = TXTextControl.VerticalAlignment.Bottom;

myTable.Cells.GetItem(1, 1).CellFormat = myCellFormat;
Dim MyCellFormat As New TXTextControl.TableCellFormat()

MyCellFormat.BackColor = System.Drawing.Color.LightBlue
MyCellFormat.BottomBorderWidth = 150
MyCellFormat.VerticalAlignment = TXTextControl.VerticalAlignment.Bottom

MyTable.Cells.GetItem(1, 1).CellFormat = MyCellFormat

Properties

Property Description
BackColor Gets or sets the table cell's background color.
BottomBorderColor Gets or sets the color of the table cell's bottom border.
BottomBorderWidth Gets or sets, in twips, the width of the table cell's bottom border.
BottomTextDistance Gets or sets, in twips, the distance between the table cell's bottom border and its text.
LeftBorderColor Gets or sets the color of the table cell's left border.
LeftBorderWidth Gets or sets, in twips, the width of the table cell's left border.
LeftTextDistance Gets or sets, in twips, the distance between the table cell's left border and its text.
NumberFormat Gets or sets a number format for the table cell.
RightBorderColor Gets or sets the color of the table cell's right border.
RightBorderWidth Gets or sets, in twips, the width of the table cell's right border.
RightTextDistance Gets or sets, in twips, the distance between the table cell's right border and its text.
TextType Gets or sets the text type of the table cell which determines whether the cell's text is interpreted as a number or as text When the type is Standard, the cell's text is interpreted as text and it is displayed as it is.
TopBorderColor Gets or sets the color of the table cell's top border.
TopBorderWidth Gets or sets, in twips, the width of the table cell's top border.
TopTextDistance Gets or sets, in twips, the distance between the table cell's top border and its text.
VerticalAlignment Gets or sets the vertical alignment of the text in the table cell.

Further Reading

Learn more about the TXTextControl.TableCellFormat Class in the Text Control Blog: