I have a custom derived LookAndFeel_V4, which I use to style juce::PopupMenus in my GUI. To my knowledge, overriding various functions from PopupMenu::LookAndFeelsMethods is the only way to force a custom Font size onto the menu.
Ok, so far so good. Now I’m trying to incorporate the same LAF onto the menu associated with juce::ComboBox. Here’s what I’ve tried:
The menu will use the same lookAndFeel as the ComboBox, so I think the second option is the correct approach. I’m not sure why the menu would display completely white - this will need some debugging. If you’re not able to get to the bottom of it, please send us a minimal example and/or steps to reproduce the issue, and I’ll take a look.
what i do for custom look is create a new file called lookFeel for the drawing and as a public juce::LookAndFeel_V4
then for the custom widgets ill have a file, for example CustomRotarySlider as a public juce::Slider and set the slider properties in the constructor, using setCustomLookAndFeel(&lookFeel).
for you, just use public juce::ComboBox and in your drawing file use the drawComboBox.
drawComboBox (Graphics &, int width, int height, bool isButtonDown, int buttonX, int buttonY, int buttonW, int buttonH, ComboBox &) override