Tavish
December 1, 2020, 8:48am
1
Hi everyone! I am making a quiz app in which I have a problem. When I press a checkbox all the other checkboxes should be unchecked. But it s not working. I have attached the aia file and the blocks image
Quiz_base.aia
Please tell if I am typing anything wrong here in the topic, I am very new to this community
Hi @Tavish Welcome to our community .
I think you should shorten your code with Any Component, see the tutorial below to find out about (AnyComponent) :
http://ai2.appinventor.mit.edu/reference/other/any-component-blocks.html
ABG
December 1, 2020, 4:49pm
3
The Checkbox OnChanged event is rather sensitive.
Here are some possibilities to watch out for ...
It is triggered by both checking and unchecking by a user
It is triggered by both checking and unchecking by a block
That could cause cascades of side effects.
That's why I like List Pickers and List Views for this type of app.
Tavish
December 3, 2020, 5:31am
4
I know that that's why I made the variable state
Anke
December 3, 2020, 8:15am
5
Describe in detail what should happen and in what order:
do this (click, un/check, ...) → result?
do that (click, un/check, ...) → result?
...
and show examples (screenshots) of what the result is and how it should be.
I think you'd better use buttons or listview instead of cehckbox
Tavish
December 8, 2020, 8:18am
7
It should be like if one is checked then all other should be unchecked. Just like in google forms
I have tried to make what you say but it can't work, it checked together.
btw, why don't you use Listview or Button?
TIMAI2
December 8, 2020, 2:27pm
9
I believe this is what you are after ?
Selecting any checkbox will tick it and clear the other checkboxes, selecting a ticked checkbox will clear it, and leave other checkboxes clear also.
1 Like
wow tht is cool idea thank you @TIMAI2
ABG
December 8, 2020, 4:26pm
11
The group of check boxes with this action is commonly called a radio button,
after antique car radios with mechanically linked push buttons for choosing radio stations.
system
Closed
December 23, 2020, 5:22am
13
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.