Dim P As Panel
Dim su As StringUtils
Dim h1 as Integer
For Each M As myObject In MyList.Values
P.Initialize("")
P.Loadlayout("MyLayout")
If M.Property1 = True then
Label1.Left=10dip
Else
Label1.Left=100%x - Label1.Width - 10dip
End If
Label1.Text = M.Property2
h1 = su.MeasureMultilineTextHeight(Label1,M.Property2)
Label1.Height = h1
Label2.Text = M.Property3
MyCustomListView.Add(P, h1 + 2dip, M)
Next