Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to remove the braces from the front end output associated with DynamicModule? For instance:

DynamicModule[{x}, {Slider[Dynamic[x]], Dynamic[If[x>.5,a=1;,{}]]}]

This returns a slider with braces around it. Is there a way to avoid or remove the braces?

share|improve this question
Row@{Slider...? This is what you want? – Kuba Sep 19 '13 at 5:57
@Kuba: Yes! But can they also be eliminated from the Dynamic[If[...]]? – user8454 Sep 19 '13 at 6:01
@user8454 does Dynamic[If[x > .5, a = 1;, Spacer[0]]] do what you want? – Mr.Wizard Sep 19 '13 at 6:02
Yes @Mr.Wizard! Sorry @Kuba! Thanks guys! – user8454 Sep 19 '13 at 6:03
@Kuba Do you care to post both parts as an answer? – Mr.Wizard Sep 19 '13 at 6:04
up vote 5 down vote accepted

Quick fix to your code would be to add Row and Spacer[0].

DynamicModule[{x}, Row@{Slider[Dynamic[x]], Dynamic[If[x>.5,a=1;, Spacer[0]]]}]

Instead of Spacer[0] you can use empty string: "", or Invisible[""].

Those braces are in output because you put them there. To know more about organizing an output, take a look at documentation:

tutorial / Grids Rows and Columns overview

there are also interesting related Q&A-s here on Mathematica.SE, for example:

Why use Column with Rows instead of Grid?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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