Button state reset Block question

Hi all,

I am trying to use blocks to reset a number of buttons back to their original states.
The user clicks on a button and the background color changes to orange. If they click on the same button again it returns to the original color blue. This works so far. My problem is detecting if all of the buttons have been pressed and displaying orange. IF they are all orange I want to make a reset button visibility set to True. I have attached a screen shot of my Blocks for you to look at. At the moment there are only 2 buttons but I plan to have up to 10 buttons so I suppose I would have to use a For Loop to revert to original color as well as checking to see if they are all orange? Any nudge in the right direction there would be appreciated.

As always, thanks in anticipations


To begin with, I recommend that you study Any Components blocks well, so that you can solve your tasks 10-100 times easier.

After that, you can easily create a loop on all the buttons and make it check for the blue color. If you see a blue color, exit the function immediately. If the blue color is not met, then after completing the loop, make a block in which the reset button becomes visible.

1 Like

Hi actech,

Great recommendation, I just looked at the documentation and it seems to be what I am looking for which makes a lot more sense than the way i was heading!

Thank you!

1 Like