Customization of combobox popup menu

I’m trying to customize combobox popup menu.
I want to remove the white horizontal lines and make the menu with rounded corners.
Is it possible to do with PopupMenu::Options?

The simplest approach is probably to derive from LookAndFeel_V* and to override drawPopupMenuBackgroundWithOptions to draw the desired style. You’ll need to set this custom look and feel on your combo box, or alternatively as the default look and feel for the entire application.

1 Like

void PresetComboBoxLookAndFeel::drawPopupMenuBackgroundWithOptions(Graphics& g,
int width,
int height,
const PopupMenu::Options& options)
g.fillRoundedRectangle(2, 2, width - 4, height - 4, 5);
ignoreUnused(width, height);

But still can’t get rid of white rectangle around the popup menu, although got rounded corners inside it.

1 Like

In case someone else stumbles with this and has trouble getting round corners: PopupMenu::backgroundColourId must not be completey opaque (it must have an alpha value of less than 1.0f), otherwise the entire area behind the popup menu is painted white, regardless of the colour of the backgroundColourId.