Message Boards Message Boards

How can I set the font size for popup menu

Posted 9 years ago

I tried all possible options, but I cannot seem to figure out how to change the font size of the pop up menu inside a control object for Manipulate.

enter image description here

{{Application, "Energy Storage"}, {"Energy Storage", 
  "Shock Absorption", "Pulsation Dampener"}, ControlType -> PopupMenu,
  Background -> LightGray, FieldSize -> 17}

I would appreciate some help. Thanks.

POSTED BY: Kaushik Mallick
3 Replies
Posted 9 years ago

Another way:

Manipulate[Application,
    {
      {Application, "Energy Storage"},
      {"Energy Storage", "Shock Absorption", "Pulsation Dampener"},
      MenuStyle -> {Bold, Red, fontsize}, ControlType -> PopupMenu
    },
    {{fontsize, 18, "Size"}, {12, 18, 24, 48}}
 ]

enter image description here

POSTED BY: Hans Milton

This was tremendous! Thank you so much.

POSTED BY: Kaushik Mallick

You have to use val -> lbl syntax and style labels. Like this:

Manipulate[
 Application,
 {{Application, "Energy Storage"},
   Thread[ # -> Thread @ Style[#, Bold, Red, 18] ] & @ {"Energy Storage",  "Shock Absorption", "Pulsation Dampener"}, 
   ControlType -> PopupMenu}
 ]

enter image description here

POSTED BY: Kuba Podkalicki
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract