Trying to wrap my head around custom listview.

Dman

Active Member
Licensed User
Longtime User
I am trying to figure out the custom list view. If I put a checkbox in each line, is there a way to have a message box pop up telling me every time a checkbox is checked or unchecked?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
See the CustomListView example. In that example the checkboxes event name is set to "". You should instead set the EventName to "chk" (in the initialize call) and add this method:

B4X:
Sub chk_CheckedChange(Checked As Boolean)
   Dim index As Int
   index = clv2.GetItemFromView(Sender)
   Dim pnl As Panel
   pnl = clv2.GetPanel(index)
   Dim chk As CheckBox
   chk = pnl.GetView(2)
   Msgbox("Item value: " & clv3.GetValue(index) & CRLF & "Check value: " & chk.Checked, "")
End Sub
 
Upvote 0
Top