Message Boards Message Boards


How can I set the font size for popup menu

Posted 8 years ago
3 Replies
2 Total Likes

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 8 years ago

Another way:

      {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:

 {{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
or Discard

Group Abstract Group Abstract