### Customized ListView one Line per Row

This is an example of building a customized ListView with one line per row.
In this example, the line contains a Label showing a Title. The Label tag holds the ID.
Both Title and ID are selected from a SQlite database.
Define the sub to add the line to the listview
`Sub listviewAddOneLine(lv As ListView, Line1 As String, Value As Object)
Dim ap As AnchorPane
ap.Initialize("")
Dim lbl1 As Label
lbl1.Initialize("")
lbl1.Text = Line1
lbl1.Font = fx.DefaultFont(16)
lbl1.Tag = Value
ap.AddNode(lbl1, 0, 0, lv.Width, 20dip)
lv.Items.Add(ap)
End Sub`
Add the line to the listview lvwImages
listviewAddOneLine(lvwImages, cursor.GetString("Title"), cursor.GetString("ID"))
Select the line from the listview lvwImages
Dim ap As AnchorPane = lvwImages.SelectedItem
Dim title As Label = ap.GetNode(0)
Dim id As Int = title.Tag

Changed: , Category: ListView, File: T6C216M1580.htm, ID: 1580