PopupView

PopupView[{expr1,expr2,}]

represents an object which displays as a popup menu whose items are the expri.

PopupView[{expr1,expr2,},i]

makes the i^(th) entry be the one currently chosen.

PopupView[{expr1,expr2,},i,base]

displays as base if it is not being clicked.

Details and Options

  • PopupView[list,Dynamic[i]] takes the item chosen to be specified by the dynamically updated current value of i, with the value of i being reset if a different item is chosen.
  • The following options can be given:
  • AlignmentAutomatichow to align objects in the display area
    BaselinePosition Baselinealignment relative to surrounding text
    BaseStyle{}base style specifications for the displayed menu
    Enabled Automaticwhether the menu is enabled, or grayed out
    FieldSize {{1.,50.},{1.,10.}}the size of the field for menu items
    FrameMargins Automaticmargins inside the menu frame
    ImageMargins 0margins around the displayed menu
    ImageSize Allthe overall image size of the displayed menu
    ContentPaddingTruewhether to shrink the margins tightly around the contents
  • With the default option setting ImageSize->All, PopupView always leaves space for the largest of the expri to be displayed, so that its overall size does not change.
  • With ImageSize->Automatic, PopupView leaves space only for the expri currently being displayed.
  • Item can be used to give style specifications that apply throughout a menu item.
  • PopupView by default displays the lbli in "PopupView" style, which typically uses the system menu font.
  • With the default setting BaselinePosition->Baseline, the baseline of the PopupView is taken to be the baseline of the currently displayed item.
  • The settings for BaseStyle are appended to the default style typically given by the "PopupView" style in the current stylesheet.

Examples

open allclose all

Basic Examples  (2)

Display elements of a list in a popup field:

Display graphics:

Scope  (7)

PopupView Content  (4)

Start with the third item shown:

Display a framed to indicate the popup:

Use graphics as content in PopupView:

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

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

PopupView Control  (3)

Start by displaying the third item:

The setting is based on position:

Connect a PopupView to a slider:

Options  (7)

BaselinePosition  (1)

Align with text:

Enabled  (2)

By default, PopupView is enabled:

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

FieldSize  (1)

Use a predefined size:

Specify a specific width and height:

FrameMargins  (1)

Add margins within the view:

ImageMargins  (1)

Add margins outside the view:

ImageSize  (1)

Control the overall height and width:

Applications  (2)

Use a label list and a content list:

Use a function that enumerates by integer position:

Properties & Relations  (1)

The setting in PopupView is based on position:

The setting in PopupMenu is based on the list value:

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2023_popupview, organization={Wolfram Research}, title={PopupView}, year={2010}, url={https://reference.wolfram.com/language/ref/PopupView.html}, note=[Accessed: 19-March-2024 ]}