rtLib — Notes Rich Text Management Library Documentation of rtLib — Notes Rich Text Management Library Download rtLib — Notes Rich Text Management Library FAQ of rtLib — Notes Rich Text Management Library Purchase rtLib — Notes Rich Text Management Library Feedback about rtLib — Notes Rich Text Management Library

Building and managing rich text

Rich text constructs - rtContainer Object

Start search Mail feedback Back to Description

The rich text fields may contain complex subordinated structures, like tables embedded in other tables, computed text within hotspot within section within table. Note that not all of these combinations can be created from user interface. The tool consequently must flexibly deal with this kind of situations.

We use rtContainer class as a container for all objects. All object classes inherit from internal rtObject class, so we use rtObject in this drawing to refer to different objects that can be contained in Rich Text item.
The drawing shows a general object hierarchy. The top object represents either top level Container or object content. Each object that contain other objects like table cell, hotspot or section manages its contained elements via rtContainer object available through Content property.
Dim rtSection as rtContainer, section as rtSection
... obtain rich text and find section
Set rtSection = section.Content
Not all objects have meaningful Style or Color attributes. Some objects (rtObject n) contain a container ( rtContainer) object itself. In this way the objects may be easily located within other objects. Characteristic example is a text within table cell or image within section. This type of objects will be below referred to as container type objects. All objects are either freestanding (created using constructor New) or contained within particular hierarchy - either retrieved from rich text item or added to hierarchy using method add or similar methods.
On the other hand rtStyle objects may be connected to different rtObjects simultaneously. Thus one rtParagraphstyle or rtFontstyle may be associated with different paragraphs or text fragments.
Starting with version 1.3 there is a top level object rtItem. rtItem can be only top object, any other objects may contained by other objects. rtContainer object returned by rtItem.Container property contains all objects in Notes Rich Text item. A standalone rtContainer object can also be used to manipulate the content of an item; in this case use getRichTextItem method to populate it.
set ctx = New rtContainer
ctx.getRichTextItem doc, Item_name
ctx.getRichTextItem docOther, Item_name
Each invokation of getRichTextItem method retrieves a content of an item allowing to merge several items.