Tables in TRichView Documents

<< Click to display table of contents >>

Tables in TRichView Documents

Tables arrange content in rows and columns. Each table cell is a subdocument containing its own items. Tables can be nested.

More details:

Overview of tables,

TRVTableItemInfo (see for detailed information).

Style of this item type: rvsTable (-60)

There is an important differences between properties of tables and properties of any other items. To change values of properties of any other item as an editing operation, you need to use special methods. But direct assignment to properties of TRVTableItemInfo is written to an undo buffer, if this table is already inserted in TCustomRichViewEdit.

Extra Properties

This item type has the following specific string properties:

rvespImageFileName value of this property can be saved in HTML file as table background image location; also accessible as table.BackgroundImageFileName.

Methods of TCustomRichView

The following viewer-style methods add item of this type to the end of the document:

AddItem (create TRVTableItemInfo object, add it using AddItem)

The following method returns TRVTableItemInfo object

GetItem

Methods of TCustomRichViewEdit

The following editor-style method inserts item of this type at the position of caret:

InsertItem (create TRVTableItemInfo.object, insert it using InsertItem)

The following methods return TRVTableItemInfo object at the position of caret:

GetCurrentItem,

GetCurrentItemEx.

Resizing

Users can resize table rows and columns, if rvtoRowSizing and/or rvtoColSizing are included in table.Options.

Resizing changes BestWidth and BestHeight properties of table cells.

OnItemResize event occurs after resizing.

Saving and Loading

See Export of tables.