For i = 1 To messageCount
Dim chk As CheckBox
chk.Initialize("chkBoxSelection")
Subject = arraySubject(aIndex) 'get the item from the array
chk.Text = Subject
chk.textSize = FontSize
chk.TextColor = FontColor
chk.tag = i
lstChecks.Add(chk)
Dim lbl1 As Label
lbl1.Initialize("")
From = arrayFrom(aIndex) 'get the item from the array
lbl1.Text = From
lbl1.Gravity = Gravity.CENTER_VERTICAL
lbl1.textSize = FontSize
lbl1.TextColor = FontColor
Panel1.AddView(chk, 0, Height * (i - 1), 49%x, Height)
Panel1.AddView(lbl1, 50%x, Height * (i - 1), 49%x, Height)
aIndex = aIndex + 1
Next