Skip to main content
ITextRow interface

The ITextRow interface provides methods to insert one or more identical table rows, and to retrieve and change table row properties. To insert nonidentical rows, call ITextRow::Insert for each different row configuration.

When to implement

Applications typically do not implement the ITextRow interface. Microsoft text solutions, such as rich edit controls, implement ITextRow as part of their TOM implementations.

When to use

Applications retrieve this interface by calling the ITextRange2::GetRow method.

Members

The ITextRow interface inherits from the IDispatch interface. ITextRow also has these types of members:

Methods

The ITextRow interface has these methods.

MethodDescription
Apply

Applies the formatting attributes of this text row object to the specified rows in the associated ITextRange2.

CanChange

Determines whether changes can be made to this row.

GetAlignment

Gets the horizontal alignment of a row.

GetCellAlignment

Gets the vertical alignment of the active cell.

GetCellBorderColors

Gets the border colors of the active cell.

GetCellBorderWidths

Gets the border widths of the active cell.

GetCellColorBack

Gets the background color of the active cell.

GetCellColorFore

Gets the foreground color of the active cell.

GetCellCount

Gets the count of cells in this row.

GetCellCountCache

Gets the count of cells cached for this row.

GetCellIndex

Gets the index of the active cell to get or set parameters for.

GetCellMargin

Gets the cell margin of this row.

GetCellMergeFlags

Gets the merge flags of the active cell.

GetCellShading

Gets the shading of the active cell.

GetCellVerticalText

Gets the vertical-text setting of the active cell.

GetCellWidth

Gets the width of the active cell.

GetHeight

Gets the height of the row.

GetIndent

Gets the indent of this row.

GetKeepTogether

Gets whether this row is allowed to be broken across pages.

GetKeepWithNext

Gets whether this row should appear on the same page as the row that follows it.

GetNestLevel

Gets the nest level of a table.

GetProperty

Gets the value of the specified property.

GetRTL

Gets whether this row has right-to-left orientation.

Insert

Inserts a row, or rows, at the location identified by the associated ITextRange2 object.

IsEqual

Compares two table rows to determine if they have the same properties.

Reset

Resets a row.

SetAlignment

Sets the horizontal alignment of a row.

SetCellAlignment

Sets the vertical alignment of the active cell.

SetCellBorderColors

Sets the border colors of the active cell.

SetCellBorderWidths

Sets the border widths of the active cell.

SetCellColorBack

Sets the background color of the active cell.

SetCellColorFore

Sets the foreground color of the active cell.

SetCellCount

Sets the count of cells in a row.

SetCellCountCache

Sets the count of cells cached for a row.

SetCellIndex

Sets the index of the active cell.

SetCellMargin

Sets the cell margin of a row.

SetCellMergeFlags

Sets the merge flags of the active cell.

SetCellShading

Sets the shading of the active cell.

SetCellVerticalText

Sets the vertical-text setting of the active cell.

SetCellWidth

Sets the active cell width in twips.

SetHeight

Sets the height of a row.

SetIndent

Sets the indent of a row.

SetKeepTogether

Sets whether this row is allowed to be broken across pages.

SetKeepWithNext

Sets whether a row should appear on the same page as the row that follows it.

SetProperty

Sets the value of the specified property.

SetRTL

Sets whether this row has right-to-left orientation.

 

Remarks

To select a table, a row, or a cell, use ITextRange::Expand, with the Unit parameter set to tomTable, tomRow, or tomCell, respectively. These units can also be used with the ITextRange::Move methods to navigate and select multiple rows or cells.

Some of the ITextRow properties apply to the whole row, such as the row alignment. In addition, there are a number of properties, such as cell alignment, that apply to a cell with the index set via the ITextRow::SetCellIndex method. This cell is referred to as the active cell.

ITextRow works similarly to ITextPara2, but doesn't modify the document until either the ITextRow::Apply or ITextRow::Insert methods are called. In addition, the row and cell parameters are always active, that is, they cannot have the value tomDefault.

On initialization, the ITextRow object acquires the table row properties, if any, at the active end of the associated ITextRange2. The ITextRow::Reset method can be used to update these properties to the current values for ITextRange2 object.

A rich edit control table consists of a sequence of table rows, which, in turn, consist of sequences of paragraphs. A table row starts with the special two-character delimiter paragraph U+FFF9 U+000D and ends with the two-character delimiter paragraph U+FFFB U+000D. Each cell is terminated by the cell mark U+0007, which is treated as a hard end-of-paragraph mark just as U+000D (CR) is. The table row and cell parameters are treated as special paragraph formatting of the table-row delimiters. The cell parameters are stored in an expanded version of the tabs array. This format allows tables to be nested within other tables and is allowed to go fifteen levels deep.

The architecture is quite flexible in that each table row can have any valid table-row parameters, regardless of the parameters for other rows (except for vertical merge flags). For example, the number of cells and the start indents of table rows can differ, unlike in HTML which has n×m rectangular format with all rows starting at the same indent.

On the other hand, no formal table description is stored anywhere. Information such as the number of rows must be figured out by navigating through the table. For example, the count of rows in a table can be obtained by calling ITextRange::StartOf (tomTable, tomFalse, NULL) to move to the start of the current table and then calling ITextRange::Move (tomRow, tomForward, &dcRow). The quantity &dcRow + 1 then contains the count of rows in the table, because moving by tomRow increments doesn't move beyond the last table row.

For additional information about the rich edit control's support for tables, see RichEdit's Nested Table Facility.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Tom.h

DLL

Msftedit.dll