Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

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

I would like to get input from an interactive dialog that uses Manipulate[]. But I find that my Manipulate[] breaks when I put it inside a DialogInput[]. So, when I try DialogInput[Manipulate[Plot[Sin[e x], {x, 0, 2 \[Pi]}], {e, 1, 10}]] the plot inside the dialog is not connected to the Manipulate[] slider. What am I missing here?

share|improve this question
up vote 12 down vote accepted

Try using global variables. Return the value with DialogReturn.

res = DialogInput[{
         TextCell["Set value of e. Then click Proceed."],
         Manipulate[Plot[Sin[e x], {x, 0, 2 \[Pi]}], {e, 1, 10, 
              Appearance -> "Open" }, 
         LocalizeVariables -> False], 
         Button["Proceed", DialogReturn[e]]


share|improve this answer
Nice. This may be the first practical use I've seen of LocalizeVariables -> False. – Mr.Wizard Feb 21 '12 at 23:05
Thanks, that's great. – Greg P Feb 21 '12 at 23:18

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.