### Customized ListView with Labels

This is an example of building a Customized ListView with Label Controls.
`Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private listviewMain As ListView
End Sub`
`Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("Main")
MainForm.SetFormStyle("UTILITY")
MainForm.Show
For i = 0 To 100
Dim lbl As Label
lbl.Initialize("ListviewLabel")
lbl.Text = "Item " & i
lbl.TextColor = fx.Colors.Blue
listviewMain.Items.Add(lbl)
Next
End Sub`
`Private Sub ListviewLabel_MouseClicked (EventData As MouseEvent)
Dim lbl As Label = Sender
Log($"Label: ${lbl.Text} was clicked"$)
End Sub`
`Sub listviewMain_SelectedIndexChanged(Index As Int)
Dim lbl As Label = listviewMain.Items.Get(Index)
Log($"Label: ${lbl.Text}"$)
End Sub`
Example Save ListView Label Content to Textfile
Dim l As List
l.Initialize
For i = 0 To listviewMain.Items.Size - 1
Dim lbl As Label = listviewMain.Items.Get(i)
l.Add(lbl.Text)
Next
File.WriteList(File.DirApp, "mylist.txt", l)

Changed: , Category: ListView, File: T6C216M1586.htm, ID: 1586