For this Control inside Manipulate (using Setter or RadioButton):


Is it possible to make the color of the selection change? So if "A" is selected the button is Blue, while "B" and "C" are black.

I read this post about a Button changing colors when clicked and tried to do something similar for my situation but I couldn't get it to work.

  • $\begingroup$ I believe your code should be Control[{{opt,"A"},{"A","B","C"}}]. I don't think you can add the Setter part. Control doesn't take options as far as I know, but if you select the setter you can change its background color in the Option Inspector. $\endgroup$ Jun 30, 2016 at 20:17
  • $\begingroup$ Use Control[{{opt, "A"}, {"A", "B", "C"}, ControlType -> Setter}] then in another cell evaluate Dynamic[opt] and observe this second cell as you click on the labels in the Setter $\endgroup$
    – Bob Hanlon
    Jul 1, 2016 at 1:33

1 Answer 1


The way I read the documentation one can only control the background color of a Setter or SetterBar. That is to say the foreground color is not available to the user.

If you are willing to use buttons, then I think you can accomplish your goal. I used Cyan and Gray rather than Blue and Black for visibility.

   {opt, colA, colB, colC},

     Button["A", opt = A; colA = Cyan; colB = Gray;
                   colC = Gray, Background -> colA],
     Button["B", opt = B; colA = Gray; colB = Cyan;
                    colC = Gray, Background -> colB],
     Button["C", opt = C; colA = Gray; colB = Gray;
                   colC = Cyan, Background -> colC]

 {{opt, A}, ControlType -> None},
 {{colA, Cyan}, ControlType -> None},
 {{colB, Gray}, ControlType -> None},
 {{colC, Gray}, ControlType -> None}

Mathematica graphics


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.