Android Question unchecking a custom listview checkbox

davelt99

Member
Licensed User
Longtime User
I am trying to uncheck all checkboxes in a custom listview that has a label and a checkbox on each line/panel.
I've tried:
For i= 0 To clvEmployees.GetSize -1
Dim pnl As Panel
pnl = clvEmployees.GetPanel(i)
Dim chk As CheckBox
chk.Initialize("")
chk = pnl.GetView(i)
chk.Checked = False
Next

but get the error message that an android.widget.textview cannot be cast to an android.widget.checkbox.

Is there a way to reference the checkbox in the panel??

Thank you
 

davelt99

Member
Licensed User
Longtime User
Thanks in advance, I just figured it out.

chk=pnl.GetView(i) should be chk=pnl.GetView(1)
where the checkbox is the 2nd item in the panel.
 
Upvote 0
Top