Sub AddRow(Values() As String)
' Adds a row to the table
Dim ColWidth As Int
If Values.Length <> NumberOfColumns Then
' Log("Wrong number of values.")
Return
End If
ColWidth=0
For i = 0 To NumberOfColumns - 1
Dim l As Label
l.Initialize("cell")
l.Text = Values(i)
l.Font=Font.CreateNew(12)
l.TextAlignment=l.ALIGNMENT_CENTER
l.TextColor = FontColor(i)
l.Color=CellColor(i)
Dim rc As RowCol
rc.Initialize
rc.Col = i
rc.Row = NumberOfRows
l.Tag = rc
Table.AddView(l, ColWidth, RowHeight * NumberOfRows, ColumnWidth_1(i), RowHeight_1)
ColWidth=ColWidth+ColumnWidth(i)
Next
NumberOfRows=NumberOfRows+1
Table.Height = NumberOfRows * RowHeight
'add this line
SVList.ContentHeight = Table.Height
End Sub