Forum

    • Register
    • Login
    • Search
    • Categories

    Adding SVG Icon Into the ComboBox DropDown Menu?

    General Questions
    2
    3
    48
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Natan
      Natan last edited by Natan

      Hey music lovers, Hope All is well with you

      Wondering is this possible to Add A Graphical Icon into The Combobox Menu?
      I need to add Item Text, and an Icon next To Items.

      Any Advice is Much appreciated 🙏

      alt text

      1 Reply Last reply Reply Quote 1
      • Natan
        Natan last edited by

        Also Changing the Item Colors Can Work for me

        //drawPopupMenuItem------------------------------------------------------------
        laf.registerFunction("drawPopupMenuItem", function(g, obj)
        {
            var a = obj.area;
            var h = a[3];    
            if(obj.isSeparator)
            {
                return;
            }
            
            if(obj.isTicked)
            {
                g.setColour(0xFFff7800);
                g.fillEllipse([a[0] + h/3, a[1] + h/3, h/3, h/3]);
            }
            
            g.setFont("GUI-Barlow-Medium", 20.0);
            
            if(obj.isHighlighted)
            {
                g.setColour(0xFFff7800);
                g.drawAlignedText(obj.text, [a[0] + h, a[1], a[2] - h, a[3]], "left");
            }else{
                g.setColour(0xFF9d9d9d);
                g.drawAlignedText(obj.text, [a[0] + h, a[1], a[2] - h, a[3]], "left");
            }
        });
        //----------------------------------------------------------------------------------
        
        DabDab 1 Reply Last reply Reply Quote 0
        • DabDab
          DabDab @Natan last edited by DabDab

          @Natan I tried with simple SVG path. cb2.jpg
          I am curious to know more from here. Thank you for making a thread like this.

          Trance Producer and Presets Designer.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          11
          Online

          741
          Users

          5.4k
          Topics

          50.3k
          Posts