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, create a tabbed table

Start search Mail feedback Back to Description


rtTable rtGraphic rtRowDisplayStyle rtTableStyle rtColor

add (rtContainer) addNewLine (rtContainer) addNewLine (rTextParagraph) appendStyle appendText (rtContainer) appendText (rTextParagraph) Add (rtCollection) Add (rTextParagraph) Cells Color (rtFontstyle) Color (rtTableStyle) ColumnCount Columns LayoutStyle LeftMargin (rtParagraphstyle) LeftMargin (rtTable) LeftMargin (rtTableStyle) RowCount RowDisplay Rows setRGB Style Viewer

Code fragment from sample "Table, create a tabbed table"; see full running samples in downloadable help.
Dim table As New rtTable(2, 4)
Dim i As Integer, j As Integer

Dim
font As New rtfontstyle(0)
Dim img As rtGraphic

Set table.Style = New rtStyle (0)
Set table.Style.RowDisplay = New rtRowDisplayStyle (0)
table.Style.RowDisplay.Viewer = CDTABLEVIEWER_TABS
Set table.LayoutStyle = New rtTableStyle (0)
table.LayoutStyle.LeftMargin = 3*ONE_CM

Set font.Color = New rtColor(COLOR_RED)

For
i =1 To table.rowCount
table.rows(i).TabLabel = "R" &i
For j=1 To table.ColumnCount
With table.cells(i,j)
Set .Color = New rtColor(0)
' some random color
.Color.setRGB (10000*Rnd) Mod 255, (10000*Rnd) Mod 255, (10000*Rnd) Mod 255
Set img = New rtGraphic("c:\temp\denmarkf.gif") ' make sure you have some image there
.appendstyle font
.appendText "cell " &i &"x" &j
.add img
.addNewline 1
End With
table.columns(j).CellWidth=one_CM
Next
Next

ctxDump.addNewLine 1
ctxDump.add table
ctxDump.addNewLine 1