# \[SOLVED\] ComboBox DropDown LookAndFeel

**URL:** <https://forum.juce.com/t/solved-combobox-dropdown-lookandfeel/48349>\
**Category:** General JUCE discussion\
**Created:** [October 20, 2021, 11:37am UTC](https://forum.juce.com/t/solved-combobox-dropdown-lookandfeel/48349 "2021-10-20T11:37:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheWaveWarden](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/thewavewarden/32/13708_2.png) [@TheWaveWarden](https://forum.juce.com/u/TheWaveWarden)\
**Post date:** [October 20, 2021, 11:37am UTC](https://forum.juce.com/t/solved-combobox-dropdown-lookandfeel/48349/1 "2021-10-20T11:37:45Z")

</div>

I have a custom derived `LookAndFeel_V4`, which I use to style `juce::PopupMenu`s 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:

1. Set on the combobox menu:

```auto
my_combobox.getRootMenu()->setLookAndFeel(&my_LAF);

```

This seems to have no effect, the ComboBox still uses the default LAF.

1. Set on the Combobox directly:

```auto
my_combobox.setLookAndFeel(&my_LAF);

```

The menu is now completely white. No idea why this happens.

Is there a way to achieve what I’m after?

---

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [October 20, 2021, 11:57am UTC](https://forum.juce.com/t/solved-combobox-dropdown-lookandfeel/48349/2 "2021-10-20T11:57:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![TheWaveWarden](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/thewavewarden/32/13708_2.png) [@TheWaveWarden](https://forum.juce.com/u/TheWaveWarden)\
**Post date:** [October 20, 2021, 12:35pm UTC](https://forum.juce.com/t/solved-combobox-dropdown-lookandfeel/48349/3 "2021-10-20T12:35:33Z")

</div>

I can confirm that I can attach a more modest LookAndFeel to the ComboBox directly and it works. So the problem is likely with my derived class.

---

<div class="post-metadata">

**Author:** ![TheWaveWarden](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/thewavewarden/32/13708_2.png) [@TheWaveWarden](https://forum.juce.com/u/TheWaveWarden)\
**Post date:** [October 20, 2021, 12:44pm UTC](https://forum.juce.com/t/solved-combobox-dropdown-lookandfeel/48349/4 "2021-10-20T12:44:20Z")

</div>

Yes, I found the problem. Completely on my side.

---

<div class="post-metadata">

**Author:** ![SourGummi](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@SourGummi](https://forum.juce.com/u/SourGummi)\
**Post date:** [October 20, 2021, 1:33pm UTC](https://forum.juce.com/t/solved-combobox-dropdown-lookandfeel/48349/5 "2021-10-20T13:33:12Z")

</div>

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_.

```auto
drawComboBox (Graphics &, int width, int height, bool isButtonDown, int buttonX, int buttonY, int buttonW, int buttonH, ComboBox &) override

```
