Sub CreateListItem(Text As String, Width As Int, Height As Int, Num As Int) As Panel
Dim p As Panel
If p.IsInitialized = False Then
p.Initialize("")
End If
p.Color = Colors.White
Dim chk As Switch
If chk.IsInitialized = False Then
chk.Initialize("chk")
chk.Tag = Num
End If
Dim lbl As Label
If lbl.IsInitialized = False Then
lbl.Initialize("")
End If
lbl.TextAlignment = lbl.ALIGNMENT_CENTER
lbl.Font.CreateNew (10)
lbl.Text = Text
lbl.TextColor = Colors.Gray
p.AddView(lbl, 5dip, 2dip, 100dip, Height - 1dip) 'view #0
p.AddView(chk, 100dip, 2dip, 30dip, Height - 1dip) 'view #1
Return p
End Sub