PopupView

PopupView[{expr1, expr2, ...}]
represents an object which displays as a popup menu whose items are the .

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 OptionsDetails 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
    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
    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 to be displayed, so that its overall size does not change.
  • With ImageSize->Automatic, PopupView leaves space only for the currently being displayed.
  • Item can be used to give style specifications that apply throughout a menu item.
  • PopupView by default displays the in 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 style in the current stylesheet.
New in 6 | Last modified in 8
New to Mathematica? Find your learning path »
Have a question? Ask support »