TXTextControl.TXTextControl.TableCellAttribute Property

Returns or sets attributes of a table cell.

Syntax

TXTextControl.TableCellAttribute(TableId, Row, Column, Attribute) [= value]
Parameter Description
TableId

Specifies a table. It is the same identifier set with the TableInsert method.

Row

Specifies a row number which identifies a certain cell in the table. The first row has the number one. This parameter set to zero means a complete column.

Column

Specifies a column number which identifies a certain cell in the table. The first column has the number one. This parameter set to zero means a complete row.

Attribute

Specifies the type of attribute. It can be anyone of the values listed in Constants.

Constants

Valid values for the Attribute parameter are:

Constant Description
txTableCellHorizontalPos (0)

The property value is the horizontal position of a table cell.

txTableCellHorizontalExt (1)

The property value is the horizontal extension of a table cell.

txTableCellBorderWidth (2)

The property value is the border width of a table cell.

txTableCellTextGap (3)

The property value is the width of the gap between a cell's border and its text.

txTableCellBackColor (4)

The property value is the table cell's background color.

txTableCellLeftBorderWidth (5)

The property value is the left border width of a table cell.

txTableCellTopBorderWidth (6)

The property value is the top border width of a table cell.

txTableCellRightBorderWidth (7)

The property value is the right border width of a table cell.

txTableCellBottomBorderWidth (8)

The property value is the bottom border width of a table cell.

txTableCellLeftTextGap (9)

The property value is the width of the gap between a cell's left border and its text.

txTableCellTopTextGap (10)

The property value is the width of the gap between a cell's top border and its text.

txTableCellRightTextGap (11)

The property value is the width of the gap between a cell's right border and its text.

txTableCellBottomTextGap (12)

The property value is the width of the gap between a cell's bottom border and its text.

txTableCellVertAlign (13)

The property value defines the vertically alignment of the cell's text. The following values are possible:


Constant Description
0 The text is a aligned at the top of the cell.
1 The text is vertically centered.
2 The text is a aligned at the bottom of the cell.
txTableCellHeight (14)

The property value is the minimum height of a table cell. If zero is set or returned, the cell's height is always determined through the containing text.

txTableCellPageBreakAllowed (15)

The property value is True, if the table cell can be formatted across page breaks. The property value is False, if the table cell must not be formatted across page breaks.

txTableCellIsHeader (16)

The property value is True, if the table cell belongs to a table header. The property value is False, if the table cell does not belong to a table header.

txTableCellLeftBorderColor (17)

The property value is the color of the table cell's left border line.

txTableCellTopBorderColor (18)

The property value is the color of the table cell's top border line.

txTableCellRightBorderColor (19)

The property value is the color of the table cell's right border line.

txTableCellBottomBorderColor (20)

The property value is the color of the table cell's bottom border line.

Remarks

When the row and column parameters are both set to zero the attributes of a complete table can be manipulated. When more than one table cell is specified this property returns Null (Visual Basic) or is set to empty (C++) if the cells are differently formatted.

Data Types

TableId:    Integer
Row:    Integer
Column:    Integer
Attribute:    Integer
Property value:    Variant

Limitations

Run time only.

Example

This Basic example sets a red background color for the leftmost column of a table:

TXTextControl1.TableCellAttribute(id, 0, 1, 4) = RGB(255, 0, 0)

See Also