It was asked in the forum How to add the number of check boxes that are checked with a result shown: I'm trying to create a list of details that a user will either check or not check and based on the number of boxes checked the sum will be shown either at the bottom of the page or on a separate page....Also need a reset button to uncheck all boxes when needed.
This is a nice example to work with the advanced features, in this case the checkbox advanced features.
We are using a button, 3 checkboxes and 2 labels for this example and drag them into the designer window.
For layout reasons I used additionally a vertical and horizontal arrangement.
Then in the block edidor we add some code.
1. We use a variable listCheckbox and define the list of our checkbox components.
2. Then we use an any Checkbox.Changed event to calculate the score, see screenshot.
You will find the any Checkbox.Changed event in the advanced section Any Checkbox.
3. Then we define the btnReset.Click block, see screenshot.
Developing and maintaining snippets, tutorials and extensions for App Inventor takes a lot of time.
I hope it saved some of your time. If yes, then you might consider to donate a small amount!
or donate some mBTC to Address:
Thank you! Taifun
Download aia file for App Inventor
Back to top of page ...
This work by Pura Vida Apps is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License
with attribution (name=Pura Vida Apps and link to the source site) required.