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

Cookbook

Table processing - dynamic table

Start search Mail feedback Back to Description


rtTable rtCell rtTableStyle rtColor

AltColor Collection (rtContainer) Collection (rtEnumeration) Color (rtCell) Color (rtFontstyle) Color (rtTableStyle) ColorStyle getRichTextItem LayoutStyle RowDisplay setRGB Style

Code fragment from sample "Table processing - dynamic table"; see full running samples in downloadable help.
dim table as rtTable, c as rtCell, o as variant

Dim style as rtStyle, tableBasic as rtTableStyle, rowDisplay as rtRowDisplayStyle' these are just defined for indexer to find references to the classes/methods used

call ctxDump.getRichTextItem(doc,"Body")
' get the table
Set coll = ctxDump.Collection (PARSE_GROUP_TABLE)' this parses and retrieves the tables
set table = coll.getFirstElement' we just have one table - otherwise we need to work through the collection

' set color scheme
table.LayoutStyle.ColorStyle = CDTABLE_ALTERNATINGROWS
set table.LayoutStyle.Color = new rtColor(0)
table.LayoutStyle.Color.setRGB 250,250,250
set table.LayoutStyle.AltColor = new rtColor(0)
table.LayoutStyle.AltColor.setRGB 250,0,0

' table will be displayed row by row
table.Style.RowDisplay.Viewer = CDTABLEVIEWER_ONLOADTIMER' automatic
'table.Style.RowDisplay.Viewer = CDTABLEVIEWER_ONLOADCYCLEONCE' automatic one cycle
'table.Style.RowDisplay.Viewer = CDTABLEVIEWER_ONCLICK' manual click
table.Style.RowDisplay.Transition = TRANS_BOXES_INCREMENT
table.Style.RowDisplay.Cycle = 1000 ' msec