Sub make_item
Dim p As AnchorPane
p.Initialize("p")
p.LoadLayout("listitem")
For Each v As Node In p.GetAllViewsRecursive
If v Is ImageView Then
If res.GetInt("Pic") = 1 Then
Dim iv As ImageView = v
Dim iconimg As Image
iconimg.Initialize(File.DirApp & "\jpg", res.GetInt("No") & ".jpg")
iv.SetImage(iconimg)
End If
End If
If v Is Label Then
Dim l As Label = v
l.Text = res.GetString("Surname") & " " & res.GetString("Name")
l.Style = "-fx-font-size: x-large"
If res.GetInt("Sex") = 1 Then
l.TextColor = fx.Colors.blue
Else
l.TextColor = fx.Colors.red
End If
End If
Next
lview.Items.Add(p)
listno.Add(res.GetInt("No"))
End Sub