How do I control the unchecked CheckBoxes?

Hi. On this game, the user has to check the first and second (left and middle) Checkbox. Then click on the "Kontrol" button. This is the right answer. I coded this like this.

But if the user checked all 3 buttons, the app inventor is thinking, that this must be the right answer, because the first and second checkboxes are enabled. If the 3.rd checkbox is checked or not, the program is ignoring that.

My question: How can I control the unchecked Checkboxes?

Try this-

1 Like

Thanks a lot. It worked. :slight_smile:

1 Like

The next problem is: I want change the house image after clicking the "Kontrol" button. For the next image, set all checkboxes to unchecked automatically and code another true variation for the checkboxes. It seems a little bit difficult. I tried it, but successless.

Try this, it the checkbox variation is same-

How many times should this happen?

Can the combinations be random, or do you have a set sequence in mind?

1 Like

I think, I solved the problem. It should happen many times and not randomly. Here is a picture of the blocks. Could it be made easier or is this right?

Your app is starting to look table based, where you can reuse a small number of components based on a table of puzzle elements.

For this app, your table might look like

  • image file name
  • checkbox1 target value (true/false)
  • checkbox2 target value (true/false)
  • checkbox3 target value (true/false)
  • what to say if a match for this image file
  • what to say if a mismatch for this image file.
    with one row per puzzle, 6 columns.

(I am assuming the image file determines the check box combination uniquely?)

This would allow you to work with just a single image component and a single set of check boxes, swapping in the image file name as you go from puzzle to puzzle.

Load a csv text file with your puzzles, exported from a spreadsheet like Google Sheets.

1 Like

Exactly. And so did I. You are very helpful. Thank you so much.