rvico TRichView Reference | Item Types

Tables

Top  Previous  Next

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)

Extra Properties

This item type has the following specific extra 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 in 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

Export to HTML

The TRichView's model of tables is very similar to the HTML model of tables, so tables are saved to HTML as they are.

The most of table visual properties can be saved only with use of CSS (use SaveHTMLEx method, or SaveHTML with rvsoForceNonTextCSS in Options parameter).

RTF Import

You can set RTFReadProperties.IgnoreTables to True, and tables in RTF will not be added in RichView (contents of cells will be added in the main document).

RTF tables have different structure, TRichView does a smart work for converting them.

Text export

See the following properties of TRVTableItemInfo:

TextColSeparator;

TextRowSeparator.


RichView © Sergey Tkachenko