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

Simple table

Start search Mail feedback Back to Description


rtTable

add (rtContainer) addNewLine (rtContainer) addNewLine (rTextParagraph) Add (rtCollection) Add (rTextParagraph) Cells ColumnCount Columns hasParagraphBreak RowCount

Code fragment from sample "Simple table"; see full running samples in downloadable help.
Dim table As New rtTable(Cint(Inputbox("Rows","enter rows","1")), Cint(Inputbox("Columns","enter columns", "1")))
Dim i As Integer, j As Integer
Dim rtp As rtextParagraph

For j=1 To table.ColumnCount
For i =1 To table.rowCount
Set rtp=New rtextParagraph("R" &i &"C" &j)
rtp.hasParagraphBreak = True ' first text run must have this set
table.cells(i,j).add rtp
Next
table.columns(j).CellWidth=one_CM
Next
ctxDump.addNewLine 1' the table needs a separate paragraph
ctxDump.add table
ctxDump.addnewline 1' also a paragraph behind it