Combobox dropdown hover/selected colours
-
Hi guys, I'm attempting to create my own combobox with LAF, however I'm unsure how to change the colour of the dropdown items when one is selected and/or hovered over with the mouse. Any ideas how to achieve that?
-
ComboBoxLAF.registerFunction("drawPopupMenuItem", function(g, obj) { var a = obj.area; if(obj.isHighlighted) { g.setColour(myHighLightColour); g.fillRect(a); }; if(obj.isHighlighted) { g.setColour(myHighlightTextColour); }else{ g.setColour(myTextColour); }; g.drawAlignedText(obj.text, a, "left"); });
-
@Lindon That's perfect, thanks for the info!