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 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:
-
Alignment Automatic how to align objects in the display area BaselinePosition Baseline alignment relative to surrounding text BaseStyle {} base style specifications for the displayed menu Enabled Automatic whether the menu is enabled, or grayed out FieldSize {{1.,50.},{1.,10.}} the size of the field for menu items FrameMargins Automatic margins inside the menu frame ImageMargins 0 margins around the displayed menu ImageSize All the overall image size of the displayed menu ContentPadding True whether 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 allScope (7)
PopupView Content (4)
PopupView Control (3)
Start by displaying the third item:
The setting is based on position:
Connect a PopupView to a slider:
Options (7)
Enabled (2)
Applications (2)
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