I am building an app to calculate something, I want to use checkbox.
How can I relate each checkbox to a number then I can add them up?
Example: (I have A, B, C here, and they related to number 1, 2, 3)
☐ A
☐ B
☐ C
And when I checked box A and C, it will add up A(1)+C(3), and show the answer 4.
Another approach with dictionary blocks. Every time two or more checkboxes are checked then they get added and if un checked then subtracted
1 Like
Anke
5
Or this might be the simpliest way:
It also works with any number of checkboxes.
1 Like
Hi Anke, where did you get the component "component" from please
Anke
8
Here is a version with 4 checkboxes:
chbSum4.aia (2.4 KB)
Remove the fourth one again if you don't need it. It's just to show that it also works with more than 3 checkboxes.
1 Like
system
Closed
9
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.