iList.Initialize
SQLText = "SELECT * FROM items ORDER BY mname"
iList = DBUtils.ExecuteMemoryTable(SQL1,SQLText,Null,0)
For i = 0 To iList.Size - 1
qRecord = iList.Get(i)
qMap = MapItemRecord(qRecord)
Dim cli As Panel = CreateOLCCItem(qMap.Get("iditem"),qMap.Get("mname"),qMap.Get("msize"),qMap.Get("mprice"), i, clvOLCCList.AsView.Width, 50dip)
clvOLCCList.Add(cli,qRecord(0))
Next
....
Sub CreateOLCCItem(inItem As Int, inName As String, inSize As String, inCost As Double, inIndex As Int, Width As Int, Height As Int) As Panel
Dim p As Panel
p.Initialize("")
p.SetLayout(0dip, 0dip, Width, Height) 'set the panel size before you load the layout.
p.LoadLayout("OLCCListPanel")
lbName.Text = inName
lbSize.Text = inSize
lbPrice.Text = NumberFormat2(inCost,1,2,2,False)
Dim fTest As Boolean = CheckOLCCItem(inItem)
If fTest Then
p.Color = Colors.RGB(144,238,144)
olccSelected(inIndex) = True
Else
olccSelected(inIndex) = False
End If
Return p
End Sub