### Customized ListView with CheckBoxes

To create a ListView with CheckBoxes, the Standard ListView has to be customized.
Below example creates a ListView with 3 CheckBoxes and an event to handle the CheckBox state.
Define the ListView as a Global
`Sub Process_Globals
...
Dim listviewCheckBoxes As ListView
...
Custom the ListView with CheckBox controls
Added are 3 CheckBox controls. The CheckBox property Tag is used to get the ID of the CheckBox.
' Create a listview with 3 checkboxes
`Sub initListViewCB
' Init the listview and provide eventname
listviewCheckBoxes.Initialize("listviewCheckBoxes")
' Add the listview to the mainform, with some sizes
MainForm.RootPane.addNode(listviewCheckBoxes , 10, 10, 400, 500)
' Add the checkbox controls
For i = 0 To 2
' New checkbox
Dim cb As CheckBox
' Init with eventname - this is used to action checkbox event according to the checkbox property
cb.Initialize("listviewcb")
cb.Tag = i
cb.Text = "CheckBox " & i
cb.Style = "-fx-text-fill: Blue; -fx-font-size: 1.1em; " ' Just play a bit with styles
' Add the checkbox to the listview
listviewCheckBoxes.Items.Add(cb)
Next
End Sub`
' Action the listview CheckBoxes
`Sub listviewcb_Action
' Define the checkbox and get the object that raised the event.
Dim cb As CheckBox
cb = Sender
Log("listview cb Action = Tag:" & cb.Tag & " = Checked:" & cb.checked)
' Action accordingly if required by using the Tag value
End Sub`
`

Changed: , Category: ListView, File: T6C216M1584.htm, ID: 1584