Code in your example:
Sub Button1_Click
Dim index As Int = clv2.GetItemFromView(Sender)
Dim pnl As Panel = clv2.GetPanel(index)
Dim lbl As Label = pnl.GetView(0)
Dim chk As CheckBox = pnl.GetView(2)
lbl.Text = "Clicked!"
Msgbox("Item value: " & clv2.GetValue(index) & CRLF & "Check value: " & chk.Checked, "")
End Sub
New code:
Sub Button1_Click
Dim index As Int = clv2.GetItemFromView(Sender)
Dim pnl As Panel = clv2.GetPanel(index)
Dim pnl1 As Panel = pnl.GetView(0)
Dim lbl As Label = pnl1.GetView(0)
Dim chk As CheckBox = pnl1.GetView(2)
lbl.Text = "Clicked!"
Msgbox("Item value: " & clv2.GetValue(index) & CRLF & "Check value: " & chk.Checked, "")
End Sub
The problem in your code is the fact that
pnl is the base Panel in the CustomListView.
pnl.GetView(0) returns the Panel of the layout. This is the only view in the base panel.
To get the views of the layout panel you must define it with:
Dim pnl1 As Panel = pnl.GetView(0)
and the other views with
pnl1.GetView(x)
which are child views of
pnl1 and not
pnl.
Attached a modified version of your example project.