Do While Warnings.NextRow
Dim tCell As TableCell = TableView1.AddSingleLine("")
tCell.ShowSelection = False
tCell.CustomView = CreateItem(TableView1,Warnings.GetString("Warning"), Warnings.GetString("System"))
Loop
Private Sub CreateItem(tvTableView As TableView, TopLine As String, BottomLine As String) As Panel
Dim lblWarning, lblSystem As Label
ParentPanel.Initialize("ParentPanel")
ParentPanel.Width=100%x
ParentPanel.Height=tvTableView.RowHeight
lblWarning.Initialize("lblWarning")
lblWarning.Font = Font.CreateNew(20)
lblWarning.color=Colors.Black
lblWarning.TextColor=Colors.Green
Dim rs As RichString
rs.Initialize(TopLine)
rs.Underline(True,Colors.green ,0,uLine(TopLine)) 'Underline length varies with subject
rs.SetToLabel(lblWarning)
lblSystem.Initialize("lblSystem")
lblSystem.Font = Font.CreateNew(16)
lblSystem.Color = Colors.Black
lblSystem.TextColor = Colors.White
lblSystem.Text = BottomLine 'No text formatting here
Dim HalfHeight As Int = tvTableView.RowHeight/2
ParentPanel.AddView(lblWarning,0,0,100%x,HalfHeight)
ParentPanel.AddView(lblSystem,0,HalfHeight,100%x,HalfHeight)
Return(ParentPanel)
End Sub