Sub CreateListItem2(Text As String, Width As Int, Height As Int, phonelist As List) As Panel
Dim p As Panel
p.Initialize("")
p.Color = Colors.Black
Dim b As Button
b.Initialize("button") 'all buttons click events will be handled with Sub Button_Click
Dim chk As CheckBox
chk.Initialize("chk")
Dim lbl As Label
lbl.Initialize("")
Dim spn As Spinner
Dim spn2 As Spinner
spn.Initialize("spn")
spn2.Initialize("spn")
spn.AddAll(phonelist)
spn2.AddAll(Array As String("Bey","Hanım","Amcacağım","Dayıcığım","Halacığım","Teyzeciğim", "Yengeciğim","Dedeciğim","Nineciğim","Ablacağım","Abiciğim","Kardeşim","Kuzenim","Yeğenim","babananeciğim", "anneanneciğim"))
lbl.Gravity = Bit.OR(Gravity.CENTER_VERTICAL, Gravity.LEFT)
lbl.Text = Text
lbl.TextSize = 16
lbl.TextColor = Colors.White
b.Text = "Click"
'p.AddView( l - T w- h
p.AddView(chk, 5dip, 2dip, 50dip, Height - 4dip) 'view #0
p.AddView(lbl, 55dip, 2dip, 165dip, Height - 4dip) 'view #1
p.AddView(spn, 220dip, 2dip, 170dip, Height - 4dip) 'view #2
p.AddView(spn2, 390dip, 2dip, 150dip, Height - 4dip) 'view #3
Return p
End Sub