2
$\begingroup$

I wish to place two CheckboxBar columns in a Manipulate; the first column would be the branch CheckboxBar and the other column, the phase checkboxBar in the code below. However Column and Grid do not display the check boxes when I attempt to add it to the code and I was wondering if it's even possible to arrange CheckboxBars like this and if so, if someone could help me? I've searched the side and could not find a thread dealing specifically with checkbox bars arranged so however.

Manipulate[
 Column[{Plot[x, {x, 0, 1}], branchList, phaseList}],
 {{branchList, {}, ""}, Table[m -> ToString[m] <> " Branch", {m, 6}], 
  ControlType -> CheckboxBar, Appearance -> ("Vertical")},
 {{phaseList, {}, ""}, Table[m -> ToString[m] <> " Phase", {m, 6}], 
  ControlType -> CheckboxBar, Appearance -> ("Vertical")},
 ControlPlacement -> Right]
$\endgroup$

1 Answer 1

5
$\begingroup$
Manipulate[Plot[x, {x, 0, 1}], 
 Row[{Control@{{branchList, {}, ""}, 
     Table[m -> ToString[m] <> " Branch", {m, 6}], 
     ControlType -> CheckboxBar, Appearance -> ("Vertical")}, 
   Control@{{phaseList, {}, ""}, 
     Table[m -> ToString[m] <> " Phase", {m, 6}], 
     ControlType -> CheckboxBar, Appearance -> ("Vertical")}}], 
 ControlPlacement -> Right]

enter image description here

Alternatively,

Manipulate[Plot[x, {x, 0, 1}], 
 Grid[{{Control@{{branchList, {}, ""}, 
      Table[m -> ToString[m] <> " Branch", {m, 6}], 
      ControlType -> CheckboxBar, Appearance -> ("Vertical")}, 
    Control@{{phaseList, {}, ""}, 
      Table[m -> ToString[m] <> " Phase", {m, 6}], 
      ControlType -> CheckboxBar, Appearance -> ("Vertical")}}}], 
 ControlPlacement -> Right]

same picture

$\endgroup$
4
  • $\begingroup$ Thanks! I can make that work. $\endgroup$
    – Dominic
    Commented Feb 25, 2020 at 11:33
  • $\begingroup$ @Kglr can you tell how to change the vertical spacing between these checkboxes? $\endgroup$
    – Rupesh
    Commented Mar 18, 2022 at 19:44
  • $\begingroup$ @Rupesh, don't know otomh how to control vertical spacings in CheckboxBar. I suggest you post it as a new question. $\endgroup$
    – kglr
    Commented Mar 19, 2022 at 2:29
  • $\begingroup$ @kglr thank you for looking into it. $\endgroup$
    – Rupesh
    Commented Mar 19, 2022 at 2:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.