ComboBox LAF



  • Trying to edit the outline of the combo box, but it disappears when I try!

    Any ideas?

    laf.registerFunction("drawComboBox", function(g, obj)
                       {
                       
                       g.setColour(0xDBD6D5D5);
                       g.drawRoundedRectangle(obj.area, 5.0, 0);
                         
                       g.setColour(Colours.withAlpha(obj.textColour, (obj.enabled && obj.active) ? 1.0 : 0.2));
                       g.setFont("Abel-Regular", 18.0);
                       
                       var a = obj.area;
                       g.drawAlignedText(obj.text, [a[0] + 10, a[1], a[2]-10, a[3]], "left");
                       var h = a[3];
                       g.fillTriangle([a[0] + a[2] - h/3 - 10, a[1] + h/3, h/3, h/3], Math.PI);
                       });
    


  • @DanH

    You've set the border size to 0

    laf.registerFunction("drawComboBox", function(g, obj)
                       {
                       
                       g.setColour(0xDBD6D5D5);
                       g.drawRoundedRectangle(obj.area, 5.0, 4);
    
                       g.setColour(Colours.withAlpha(obj.textColour, (obj.enabled && obj.active) ? 1.0 : 0.2));
                       g.setFont("Abel-Regular", 18.0);
                       
                       var a = obj.area;
                       g.drawAlignedText(obj.text, [a[0] + 10, a[1], a[2]-10, a[3]], "left");
                       var h = a[3];
                       g.fillTriangle([a[0] + a[2] - h/3 - 10, a[1] + h/3, h/3, h/3], Math.PI);
                       });
    



Log in to reply
 

12
Online

1.6k
Users

4.6k
Topics

42.5k
Posts