There is probably either a Tutorial or a dupe I can read in order to figure this out, but I haven't been able to find one by searching on my own. So here is the problem:
I want to create a function checkboxToList[]
that displays a grid of checkboxes like the following:
Column[Table[
CheckboxBar[ConstantArray[0, alfa + 1], Range[-alfa, 3]]
, {alfa, 5, 0, -1}
]
, Alignment -> Right
]
Then I want the user to be able to make selections, like e.g.
Finally, by pressing a button or something similar, I want the function to return a list of pairs {{x1,y1},{x2,y2},...}
where the x
are the row numbers of the checked boxes counting from below, starting from 0, and the y
are the checkbox labels. Thus, from the second image I would want to return {{0,0}, {0,1}, {2,-2}, {4,-4}, {4,-2}}
. The order of the pairs in the returned list does not matter to me.
Any help much appreciated!
CheckboxBar[ConstantArray[0, alfa + 1], Range[-alfa, 3]]
is effectively the same asCheckboxBar[{0}, Range[-alfa, 3]]
. $\endgroup$