Wolfram Computation Meets Knowledge

Wolfram Language & System Documentation Center Wolfram Language Home Page »

PopupMenu

PopupMenu[x,{val1,val2,…}]

represents a popup menu with setting x and possible values vali.

PopupMenu[Dynamic[x],{val1,…}]

takes the setting to be the dynamically updated current value of x, with the value of x being reset every time an item is selected from the menu.

PopupMenu[x,{val1lbl1,val2lbl2,…}]

represents a popup menu in which possible value vali is indicated by lbli.

PopupMenu[x,{val1lbl1,…},dlbl]

displays the menu item as dlbl if x is none of the vali.

PopupMenu[x,{…},dlbl,base]

displays as base when it is not being clicked.

Details and Options

Examples

open allclose all

Basic Examples  (2)

Select values from a popup menu:

Connect PopupMenu to a dynamic state:

Scope  (7)

PopupMenu Content  (4)

Use graphics as content in PopupMenu:

Use any expression as a label:

Use Null to indicate a blank label:

By default, a PopupMenu leaves enough space to display without ever resizing:

With ImageSize->Automatic, PopupMenu resizes for each pane:

PopupMenu Control  (3)

Start with value selected:

The setting is based on value, regardless of labels:

Connect a PopupMenu to a slider:

Options  (9)

Alignment  (1)

Specify an alignment within the menu:

BaselinePosition  (1)

Align with surrounding text:

Enabled  (1)

By default, PopupMenu is enabled:

By setting Enabled->False, PopupMenu is disabled, but visible in its current state:

FieldSize  (3)

Use a predefined size:

Specify width and height:

Allow a width and height between set values:

FrameMargins  (1)

Add margins within the view:

ImageMargins  (1)

Add margins outside the view:

ImageSize  (1)

Control the overall height and width:

Applications  (1)

Dynamically update the base view:

Properties & Relations  (1)

In PopupMenu, the setting is associated with the value of the element in the list:

In PopupView, the setting is associated with the position of the element in the list:

Wolfram Research (2007), PopupMenu, Wolfram Language function, https://reference.wolfram.com/language/ref/PopupMenu.html (updated 2010).

Text

Wolfram Research (2007), PopupMenu, Wolfram Language function, https://reference.wolfram.com/language/ref/PopupMenu.html (updated 2010).

CMS

Wolfram Language. 2007. "PopupMenu." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2010. https://reference.wolfram.com/language/ref/PopupMenu.html.

APA

Wolfram Language. (2007). PopupMenu. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PopupMenu.html

BibTeX

@misc{reference.wolfram_2024_popupmenu, author="Wolfram Research", title="{PopupMenu}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/PopupMenu.html}", note=[Accessed: 25-May-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_popupmenu, organization={Wolfram Research}, title={PopupMenu}, year={2010}, url={https://reference.wolfram.com/language/ref/PopupMenu.html}, note=[Accessed: 25-May-2024 ]}

Top