HISE Logo Forum
    • Categories
    • Register
    • Login

    ComboBox - no selection colour

    Scheduled Pinned Locked Moved General Questions
    11 Posts 2 Posters 241 Views
    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.
    • DanHD
      DanH
      last edited by

      when a combobox doesn't have any selection / value it will display it's text content with a darkened version of the text colour. Is there a way to turn this off / display the actual text colour?

      DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
      https://dhplugins.com/ | https://dcbreaks.com/
      London, UK

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @DanH
        last edited by

        @DanH laf

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        DanHD 1 Reply Last reply Reply Quote 0
        • DanHD
          DanH @d.healey
          last edited by

          @d-healey how?

          DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
          https://dhplugins.com/ | https://dcbreaks.com/
          London, UK

          d.healeyD 1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey @DanH
            last edited by

            @DanH

            const laf = Engine.createGlobalScriptLookAndFeel();
            
            laf.registerFunction("drawComboBox", function(g, obj)
            {
            	 
            });
            
            laf.registerFunction("drawPopupMenuItem", function(g, obj)
            {
            	 
            });
            

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            DanHD 2 Replies Last reply Reply Quote 0
            • DanHD
              DanH @d.healey
              last edited by

              @d-healey yep got lots of that going on, ok so maybe if value == 0 or something?

              DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
              https://dhplugins.com/ | https://dcbreaks.com/
              London, UK

              DanHD 1 Reply Last reply Reply Quote 0
              • DanHD
                DanH @DanH
                last edited by

                @DanH oh it was already in there 😆

                expcblaf.registerFunction("drawComboBox", function(g, obj)
                                    {
                                          var a = obj.area;
                                          
                                          g.setColour(obj.itemColour1);
                                          g.fillRoundedRectangle(a, 2);
                                          
                                          g.setColour(Colours.withAlpha(obj.textColour, (obj.enabled && obj.active) ? 1.0 : 1.0)); // here
                ;
                                          g.setFont("Lucida Console", 13.0);
                                          
                                          g.drawAlignedText(obj.text, [a[0] + 10, a[1], a[2]-10, a[3]], "left");
                
                                          });
                

                DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                https://dhplugins.com/ | https://dcbreaks.com/
                London, UK

                1 Reply Last reply Reply Quote 0
                • DanHD
                  DanH @d.healey
                  last edited by

                  @d-healey ok how about changing the colour of the combobox text / combobox when hovering? I'm trying to squeeze in

                  if (obj.over) g.setColour(0xFFE3E3E3);
                  

                  but it doesn't do anything

                  DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                  https://dhplugins.com/ | https://dcbreaks.com/
                  London, UK

                  d.healeyD 1 Reply Last reply Reply Quote 0
                  • d.healeyD
                    d.healey @DanH
                    last edited by

                    @DanH Console.print(trace(obj));

                    Libre Wave - Freedom respecting instruments and effects
                    My Patreon - HISE tutorials
                    YouTube Channel - Public HISE tutorials

                    DanHD 1 Reply Last reply Reply Quote 1
                    • DanHD
                      DanH @d.healey
                      last edited by DanH

                      @d-healey thanks, it says

                      "hover":false
                      

                      Am I out of luck?

                      DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                      https://dhplugins.com/ | https://dcbreaks.com/
                      London, UK

                      d.healeyD 1 Reply Last reply Reply Quote 0
                      • d.healeyD
                        d.healey @DanH
                        last edited by

                        @DanH You need use obj.hover not obj.over

                        Libre Wave - Freedom respecting instruments and effects
                        My Patreon - HISE tutorials
                        YouTube Channel - Public HISE tutorials

                        DanHD 1 Reply Last reply Reply Quote 0
                        • DanHD
                          DanH @d.healey
                          last edited by

                          @d-healey oh right, ha, I get it now, all working, cheers

                          DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                          https://dhplugins.com/ | https://dcbreaks.com/
                          London, UK

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

                          24

                          Online

                          1.7k

                          Users

                          11.9k

                          Topics

                          103.6k

                          Posts