Android Question Wait for with multiple checkboxes

edm68

Member
Licensed User
Longtime User
Hi,
I am trying to learn more about using 'wait for'.
Made a panel with 4 check boxes with tags 0,1,2,4.
If i check or uncheck the 0 check box it should check or uncheck the other 3 to match.
Hope that makes sense.
Pretty sure I'm doing something wrong with the 'wait for'.
For some reason it doesn't seem to iterate through all the check boxes in the panel.

I've attached a small example.
Thanks in advance for any advice.
 

Attachments

  • newCheckTest.zip
    9.8 KB · Views: 115

Erel

B4X founder
Staff member
Licensed User
Longtime User
Don't waste your time with activities. There are several mistakes in your code that will simply be solved by switching to B4XPages.

I'm not sure that I understand your code.
I would have done something like:
B4X:
Private Sub chkSum_CheckedChange(Checked As Boolean)
   Dim chk As B4XView = Sender
   If "0" = chk.Tag Then
     For Each v As B4XView In pnlCheck.GetAllViewsRecursive
      If v Is CheckBox And v.Tag <> "0" Then v.Checked = chk.Checked
    Next
   End If
End Sub
 
Upvote 0
Top