Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Dynamic Interactivity > Viewers and Annotation >
Mathematica > Dynamic Interactivity > Custom Interface Construction > Standalone Interfaces > Viewers and Annotation >

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.
  • 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
BaselinePositionBaselinealignment relative to surrounding text
BaseStyle{}base style specifications for the displayed menu
EnabledAutomaticwhether the menu is enabled, or grayed out
FieldSize{{1.,50.},{1.,10.}}the size of the field for menu items
FrameMarginsAutomaticmargins inside the menu frame
ImageMargins0margins around the displayed menu
ImageSizeAllthe overall image size of the displayed menu
  • 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.
  • 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.
  • The settings for BaseStyle are appended to the default style typically given by the "PopupView" style in the current stylesheet.
Display elements of a list in a popup field:
Display graphics:
Display elements of a list in a popup field:
In[1]:=
Click for copyable input
Out[1]=
 
Display graphics:
In[1]:=
Click for copyable input
Out[1]=
Start with the third item shown:
Display a framed Alpha 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:
Start by displaying the third item:
The setting is based on position:
Connect a PopupView to a slider:
By default, no values change until you click the popup area:
By setting AutoAction, PopupView opens as the mouse moves over it:
Align with text:
By default, PopupView is enabled:
By setting Enabled->False, PopupView is disabled, but visible in its current state:
Use a predefined size:
Specify a specific width and height:
Add margins within the view:
Add margins outside the view:
Control the overall height and width:
Use a label list and a content list:
Use a function that enumerates by integer position:
The setting in PopupView is based on position:
The setting in PopupMenu is based on the list value:
New in 6
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team