' Library: CSSUtils
Sub CreateListItem(Text As String, Text2 As String, Width As Int, Height As Int, Picture As Image) As Pane
Dim p As Pane
Dim mycheckboxes As List
mycheckboxes.Initialize
Dim chk As CheckBox
p.Initialize("")
CSSUtils.SetBackgroundColor( p, fx.Colors.Black)
Dim img1 As ImageView
img1.Initialize("img1")
CSSUtils.SetStyleProperty( img1, "fx-background-position", "center center")
img1.SetImage( Picture)
chk.Initialize("chk")
chk.Alignment = "BOTTOM_LEFT"
chk.TextColor = fx.Colors.White
chk.TextSize = 14
chk.Text = Text2
mycheckboxes.Add(chk)
Dim title As Label
title.Initialize("")
title.Alignment = "CENTER_LEFT"
title.Text = Text
title.TextSize = 16
title.TextColor = fx.Colors.White
' Dim subtitle As Label
' subtitle.Initialize("")
' subtitle.Alignment = "BOTTOM_CENTER"
' subtitle.Text = Text2
' subtitle.TextSize = 14
' subtitle.TextColor = fx.Colors.White
p.AddNode( img1, 2dip, 2dip, 50dip, Height -4dip)
p.AddNode( title, 65dip, -7dip, 300dip, Height - 4dip) 'view #1
'p.AddNode( subtitle, 66dip, -2dip, 300dip, Height - 4dip) 'view #1
p.AddNode( chk, Width * 0.88, 2dip, 300dip, Height - 4dip) 'view #2
Return p
End Sub