ComboBox with customised L&F or custom component

I’m wondering what would be cleanest / simplest to implement. We need a simple dropdown with images only (for EQ filter selection).

Option 1: Use a JUCE ComboBox and customise the L&F. Cons: Extra work to customise L&F, extra functionality we don’t need. Pros: Integrates with APVTS via ComboBoxAttachment

Option 2: Create a custom component as a popup menu. Cons: Requires extra work to connect to the parameter, converting the selection to a value for storage in the APVTS. Pros: Cleaner in terms of GUI, we only need a vertical list of image buttons.


With option 2 you mean using a ComboBox and overriding its showPopup() to show a custom component? If not, that could be an option too.

1 Like

Another option is to get the PopupMenu that will be used by the ComboBox (ComboBox::getRootMenu()) and to add custom components as list items (PopupMenu::addCustomItem). This way, you can continue using the APVTS attachments (I think!), and you don’t need to customise the L&F just for this single combo box.

1 Like

No, I hadn’t considered that option, thanks!

Thanks @reuk good tip!