Sub CREATE_LISTITEMS(ProductName As String, ProductCode As String, Width As Int, Height As Int) As Panel
Dim p As Panel
p.Initialize("")
'we need to add the panel to a parent to set its dimensions. It will be removed after the layout is loaded.
Activity.AddView(p, 0, 0, Width, Height)
p.LoadLayout("eloading_transact_cell_items")
p.RemoveView
'label1 and button1 will point to the last added views.
lblProductCode.Text = ProductCode
lblProductName.Text = ProductName
Return p
End Sub