1
$\begingroup$

How to make a drop-down selector UI component? Something that looks like this

$\endgroup$
4
$\begingroup$

You want to use PopupMenu:

PopupMenu[a, {a, b, c, d}]

Mathematica graphics

Note, if you want it to be dynamically linked to a variable, use:

PopupMenu[Dynamic[x], {a, b, c, d}]

Then, x takes the value given by the drop down menu:

Mathematica graphics

$\endgroup$
  • $\begingroup$ I don't need to show anything such as a plot that depends on the value selected in the drop-down. Rather, I just need a state-recorder that knowns the user's selection in the menu which can later be read out from the notebook. $\endgroup$ – qazwsx Sep 10 '12 at 18:29
  • $\begingroup$ @MaThEmAtika See my last update. $\endgroup$ – Eli Lansey Sep 10 '12 at 18:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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