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 with rulers

Start search Mail feedback Back to Description


rtTable rtHRule rtColor

add (rtContainer) addNewLine (rtContainer) addNewLine (rTextParagraph) Add (rtCollection) Add (rTextParagraph) Cells Color (rtFontstyle) Color (rtHRule) ColumnCount Columns hasParagraphBreak RowCount RuleWidth setRGB

Code fragment from sample "Table with rulers"; 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


Dim hr As rtHRule

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
Set hr = New rtHRule((i+j)*ONE_CM)
hr.RuleWidth= ONE_CM
Set hr.Color = New rtColor(9)
hr.Color.setRGB (10000*Rnd) Mod 255, (10000*Rnd) Mod 255, (10000*Rnd) Mod 255
table.cells(i,j).AlignVertical = CDTABLECELL_VALIGNCENTER ' CDTABLECELL_VALIGNCENTER or CDTABLECELL_VALIGNBOTTOM
table.cells(i,j).add hr
Next
table.columns(j).CellWidth=one_CM
Next
ctxDump.addNewLine 1
ctxDump.add table
ctxDump.addNewLine 1