ComboBox Drop-Down Look and Feel

Hello, my name is Timothy and I have been learning Juce on the side as a hobby alongside my schooling. I only have about a month and a half of experience with Juce, but am pretty well versed in C++, so just take that into account.

I have a problem with the ComboBox component for the GUI, or somewhat more specifically, the LookAndFeel of the ComboBox component. I have been trying to figure out where the drop-down menu for the component is drawn for about a day now, and I can’t seem to find it digging through the API, or anywhere online. I have gone through the Juce LookandFeel code all the way back to v1 and still haven’t found anything about what function is being called to draw the background of the drop-down menu, as well as it’s outline.

My specific questions are:
1) What function is calling the drop-down menu to be drawn in the lookandfeel?
2) Where is the outline colour being drawn for the drop-down element? This is not drawn by either the outlineColourID or the focusedOutlineColourID.
3) Is there a better way to find these things out if I had any more questions?

Here is an example of the outline still being drawn around the drop-down, while I have replaced both the outlineColourID, and the focusedOutlineColourID.

Thanks, this is my first forum post so if I am not following any rules, or something, just let me know.

Just in case anyone in the future has the same problem that I had, it seems that the drop-down menu is being drawn by LookAndFeel_V4, under the function drawPopupMenuBackground.
By default, the colour of the outline is set with PopupMenu::textColourId.

I wish that this was more accessible to find.

3 Likes

Referencing my request here:

I hope it falls in benevolent ears

2 Likes

I was dealing with the same problem, my solution was a custom ColourScheme, the third colour is the backroundcolour of the dropdownmenu.