I'd like to split my TogglerBar
into several rows, with it's length given in a list.
I found the Appearance
options, but they only allow one fixed horizontal/vertical dimension. Which is why I thought splitting my TogglerBar
up in several pieces would be the way to go.
data = {2, 3, 1}
Manipulate[Boole @ MemberQ[x, #] & /@ Range@Total @ data,
{x, {1, 2}, ControlType -> TogglerBar},
{x, {3, 4, 5}, ControlType -> TogglerBar},
{x, {6}, ControlType -> TogglerBar}]
How can I write this, so that it'll still work when I change the length of data
? E.g. to data = {1, 1, 2, 2}
.
data
. This list is not always going to be the same though. So I'd like to write Manipulate in a way, that I can have anydata
I want and get a number of toggler bars given by the number of elements indata
, with the number of togglers given by the numbers indata
. Please let me know if it's still confusing. $\endgroup$