Forum
    • Categories
    • Register
    • Login

    Look & Feel - ComboBox Background.

    Scheduled Pinned Locked Moved General Questions
    48 Posts 8 Posters 1.3k 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.
    • ulrikU
      ulrik @Lindon
      last edited by

      @Lindon strange, the obj contains only the width and height

      HiseSnippet 892.3ocsV88aSbDDdWmrHrgVAR7Re6TdxQJXcFnzJgP3XmXjE1AKLE0ppJzl8VedI6syo81ifUER8e3Jw+Avr2cNmSwJDrTuGx44m22Ny2LalZAgLKCrDZyWuLURn2lMaowsXvBtxPFcDg9irI7LmzFTpp+xTdVlLhPo67buBZycIEOe5Y84ZtQHqUQHuATB4XUhxUqcZuWnz5g7H4qUIq48i5MR.lAfFxQ7rCKjjxEmwikmv8t0fQn233HkCrybbmLiP2sODsb1B3bSo+uQkoNUK8BcIyvDUpdHni7H1qkLXgRGMc04NifYYZcUXmxpv8XSTQpKzWWMtSggf5HVudPabUvq62FdgaBdz0f2tkv6trYBqJ0UawisawFYvF0bN1BVGVk9RZ7uT1..8v35jvOSNzhBWDQ6GGFdP.9m8eRqVXaHyE7dN1zmzO3oAqBKV5F.IofAEZuGZauZuGe3v07TXkXMXLH35w.b1glngRots2czwNVYrxSpFlaDNEXZuWjke9THMOchzj2G66wVH2Ds2AAyW4S7AAvoua+V+cql3mICzxNoVEhDm0e.71v72LtSlGldVT6xWYcVJ0Z3bzZ.9D2YNx+dkT3Z+m3YNrHscNWE4VT9yERU7B2egt+QOfwyoOke0gAOH6+jUnK.Lm.N4KMsK.XqO1J3+ZZ97MZyWxrfVKsazreFwdUA11jmbpzd.1uz4xKbDIKWlMdiqGaTT1AWyQvLxnbuLUVIe0iSjJJfm4VgPzUWAu8NU7VjDcJzG9.QgogwvBLo.7quLg7aiNh63qRClQ7qjJsNk+vPOR9dbyR43PS1QxrybPZguU7SB8leyO5Gp+fpdKqE9idErgKT7O7dkbhZWF0Kgigyn63C1ISPP8SrwJSDX51p78Cpd+Pbm2WMCiaRfnbM2c40K9cpUFvt7kli8yplLka45kouicNgW6UhWW3dW1TkSrXy3swFvK1M++FuUav+A1wymii30fcW1veeaWW+c.kWA4NkIdB2YUdBxI4IyvcPBIhDiQpy7jlF94jR4PuruxLSZhJD9L9TYrqWlVYr6JijDtvBuUTNc4ui3lEZPLYJtprIdmMJGzc0XEiE1IjjfWc8VgvWJtOh8MGyC1hXd3VDyi1hX94sHlGuEw7KaQL+5UFi++Z3vbGjTNlfJldbw5MJ8XCGYYELRxW.MYhkrC
      

      Hise Develop branch
      MacOs 15.6.1, Xcode 16.2
      http://musikboden.se

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

        @DanH gives me this;
        ddb3c96b-4007-40bb-8500-63c22ba9e38a-image.png

        and whilst thats a nice colour :-), its not what I'm looking for...

        HISE Development for hire.
        www.channelrobot.com

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

          @Lindon can't you make it 0x00000000?

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

          LindonL 1 Reply Last reply Reply Quote 0
          • LindonL
            Lindon @ulrik
            last edited by

            @ulrik - oh yeah, very odd I think...

            HISE Development for hire.
            www.channelrobot.com

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

              @DanH said in Look & Feel - ComboBox Background.:

              @Lindon can't you make it 0x00000000?

              hmm, just randomly throwing hex values into the ring isnt helping here...try it yourself and see if this works (hint: it doesnt)

              HISE Development for hire.
              www.channelrobot.com

              DanHD LindonL 2 Replies Last reply Reply Quote 0
              • DanHD
                DanH @Lindon
                last edited by

                @Lindon so sorry

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

                1 Reply Last reply Reply Quote 0
                • LindonL
                  Lindon @Lindon
                  last edited by Lindon

                  this gets a strange result:

                  ComboBoxLAF.registerFunction("drawPopupMenuBackground", function(g, obj)
                  {
                  	//var a = obj.area;
                  	g.setColour(Colours.red);
                      g.drawRect([0,0,2000,2000], 1);
                  });
                  

                  you get this:

                  11b4eab6-5aa0-420e-a445-bd4b8a6e05b7-image.png

                  -- see the little red line on the left side?

                  ComboBoxLAF.registerFunction("drawPopupMenuBackground", function(g, obj)
                  {
                  	//var a = obj.area;
                  	g.setColour(Colours.red);
                      g.fillRect([0,0,2000,2000]);
                  });
                  
                  

                  predictably gets this:
                  37f31bf6-90c5-44b5-a2b9-42665e46b8d8-image.png

                  but this:

                  ComboBoxLAF.registerFunction("drawPopupMenuBackground", function(g, obj)
                  {
                  	//var a = obj.area;
                  	g.setColour(0x00000000);
                      g.fillRect([0,0,2000,2000]);
                  });
                  

                  gets us back to this:

                  e897277b-97b0-46c0-958c-a0c6d06427a1-image.png

                  HISE Development for hire.
                  www.channelrobot.com

                  David HealeyD 1 Reply Last reply Reply Quote 0
                  • David HealeyD
                    David Healey @Lindon
                    last edited by David Healey

                    @Lindon I'm pretty sure you can't make the background of the combo box transparent. It will give a white outline (the panel is opaque basically). You can make the individual items have a transparent background though.

                    Free HISE Bootcamp Full Course for beginners.
                    YouTube Channel - Public HISE tutorials
                    My Patreon - HISE tutorials

                    LindonL 1 Reply Last reply Reply Quote 0
                    • LindonL
                      Lindon @David Healey
                      last edited by

                      @d-healey - yeah that's the position I'm rapidly reaching. Thanks. I'm not sure this is a bug but its certainly a feature it would be nice to have,....

                      HISE Development for hire.
                      www.channelrobot.com

                      1 Reply Last reply Reply Quote 0
                      • DabDabD
                        DabDab
                        last edited by

                        BG CB transparent is not a bug. Transparent is not possible right now with out altering the source Code. How ever it will be a good feature request to have CB transparent BG.

                        Bollywood Music Producer and Trance Producer.

                        1 Reply Last reply Reply Quote 0
                        • David HealeyD
                          David Healey
                          last edited by

                          I would like to give this one a bump. According to everything I read on the JUCE forum, the popup menu is by default opaque, unless you set PopupMenu::backgroundColourId to a colour with an alpha < 1.0.

                          I've been through all the HISE popup look and feel functions I could find and set this property to transparentWhite but still the combo boxes show a white background.

                          @Christoph-Hart Any ideas?

                          Free HISE Bootcamp Full Course for beginners.
                          YouTube Channel - Public HISE tutorials
                          My Patreon - HISE tutorials

                          dannytaurusD 1 Reply Last reply Reply Quote 0
                          • ChazroxC
                            Chazrox
                            last edited by Chazrox

                            If you use a viewport and check 'useList'. Then you can make a transparent list area. You just have to also make a label of some sort showing the currently loaded index/value, so that the user can click to reveal the viewport list. Pretty much what a combobox is. Little hacky but I got what I wanted without doing anything too crazy. I prefer to do this when the list is very long, you can set it to open at a set size and have a nice scrollbar.

                            1 Reply Last reply Reply Quote 0
                            • dannytaurusD
                              dannytaurus @David Healey
                              last edited by dannytaurus

                              @David-Healey I just had a go at fixing this. Is that what you mean?

                              HISE-PopupTransparentBackground.gif

                              HiseSnippet 1112.3ocsVs2aaaCDmJIJKwacqEne.H7e4roYH+pIcACMO8pwxCi4rhMDDTPKcxhKRjFRTMwXneH12z8MH6ndXKO6klZfI.av6Eue2wi2w9QRGHNVFQLpb0jw.w3qLGLQn7O1mwEjdmPL9ZyyYwJHhlw5nIiYwwfKwvX8eRyvX6MHoe+8aNhEvDNvLVDx6jbG3LdHWMia+C9YdPPWlKbEOrj1sOnmiTbrLPlf3YcSaxXlysrQvELsZqYRdKK1mX7sl1scX60zqSqVu9061wcH330.FtqCytCyqCC41l0tSi1DiMO0kqjQCTLEDia5QR2IC7k2Ixbv63w7gAflnAY.54L1ji84At8KRNwDhwF8mkpVOKU8Ryy4t7o7mkxddp.5LKJmzLV6wfTiOCHYTBRajAoWXNvIhOVMShFOeoYOAdB5wvylxPISWxZ+05lGKQMDp5gragtQHwTKp0z11hh+sy9UpfmOwJZ.yi9izBSbh.LRNS5vBNSJu8PgaW.BpoUGUrdDLhqqe5lHbTbonVU2H1c8kiSFeNHRNBOhGEISDtUsndE5LxhJG9G6T4OqPwuQ0iAUVcQsp12am+UEcQlXOrd5W.GUsqssrsz.F+cCJ9iOQTzSAg+29+CrHJCiXjUcFFs3dVvdLy8PjCJ7Z1012P+NZSKJ65FSW07F52SaqW0Jc0M6uPHo2Vd7a4i7CveJvk9FZln35ih.PP+gozCCRf4CacpCb0QOSLJ.pkiHK5d6TBmJ3dUAPy0HCt6YUDCHnmsNE1Md0LFstYIHu.U24yUyfEJuKVaTq5IfGKIPgI1FsqaOUtNyeHFpBv8JDVowuFeVSQoEsZ.3opVbBlU1crLbn7H48MJU7MRikvwRAnc3TMzVNkPCnEJOwhhc1u37lJEWHUvkhZ5i7sq7wJz+sHOukJSiiHYP.DsTw5FbQOlg0DIgCgHK7PRexVnHdgd9tDa9z5R3jkVJonTzSvUWNFxo6JCb0290qWrmBIOup6tjiPTUUZukmm2aoHuR3t5VKSSyjzPnbyexu16DlhUrY39h9ZLDo35Px3D3C3vgrFWaadBDeqRNF6yO8.kXrUlqeVQaMl.BR86VloqaPturCmTl.KICKFlr8lDxCOLO2lkYeG2U4OyZ9A9f9tXYNjR35KdhoDDclFMyPlowKwEgrTdqunO+8CzXCSLei4kBnxU2IqbkOd8GGXtPedbBizMIfoleridfbt.rJatd8594hXtZR4A1eFyhrezYQOUH9By9bki+xw3ZKAiXsy+GXLeB9yLO0yC6bNCfaX182V0w0eB2icpUbwnyYpHttF3hjvAXYnCfdWf0xw55h0z2Ayns0z5Lv.P3lR7.9kKrgl1HWXiBgX0kSj78NY2b0uQXqTNHlDougZa7wbHMcIWVCwmr7dGm42pELr4pZXqU0v1qpgcVUCe0pZ3tqpg68oMT+hxCSTxvrqMDx48OMs4pgwoBFVAlVsR9GztgJYG
                              
                              Content.makeFrontInterface(200, 200);
                              
                              const laf = Content.createLocalLookAndFeel();
                              
                              laf.registerFunction("drawPopupMenuBackground", function(g, obj)
                              {
                                  g.setColour("0x00000000"); // any transparent colour
                                  g.fillRect([0,0,200,200]);
                              });
                              
                              laf.registerFunction("drawPopupMenuItem", function(g, obj)
                              {
                                  var a = obj.area;
                              
                                  var padArea = [a[0] + 2, a[1] + 2, a[2] - 4, a[3] - 4];
                                  g.setColour(obj.isHighlighted ? Colours.green : Colours.blue);
                                  g.fillRoundedRectangle(padArea, 8);
                              
                                  var textArea = [padArea[0] + 8, padArea[1], padArea[2] - 16, padArea[3]];
                                  g.setColour(Colours.white);
                                  g.setFont("Default", 14.0);
                                  g.drawAlignedText(obj.text, textArea, "left");
                              });
                              
                              const ComboBox1 = Content.getComponent("ComboBox1");
                              ComboBox1.setLocalLookAndFeel(laf);
                              

                              The drawPopupMenuBackground object should probably include an area, and the popup menu items still have a subtle drop shadow. But they're both fixes for another day.

                              PR here, if it's useful: https://github.com/christophhart/HISE/pull/805

                              Meat Beats: https://meatbeats.com
                              Klippr Video: https://klippr.video

                              David HealeyD ChazroxC 4 Replies Last reply Reply Quote 5
                              • David HealeyD
                                David Healey @dannytaurus
                                last edited by

                                @dannytaurus Excellent, thanks

                                Free HISE Bootcamp Full Course for beginners.
                                YouTube Channel - Public HISE tutorials
                                My Patreon - HISE tutorials

                                1 Reply Last reply Reply Quote 1
                                • ChazroxC
                                  Chazrox @dannytaurus
                                  last edited by

                                  @dannytaurus sick man. 🔥

                                  1 Reply Last reply Reply Quote 1
                                  • David HealeyD
                                    David Healey @dannytaurus
                                    last edited by

                                    @dannytaurus Seems to work perfectly

                                    2679e95d-956d-462c-9f26-5f007ba5124f-image.png

                                    Free HISE Bootcamp Full Course for beginners.
                                    YouTube Channel - Public HISE tutorials
                                    My Patreon - HISE tutorials

                                    dannytaurusD 1 Reply Last reply Reply Quote 2
                                    • dannytaurusD
                                      dannytaurus @David Healey
                                      last edited by

                                      @David-Healey Excellent! Your example just reminded me this also solves my issue with getting rounded corners on the MID Learn popup too. Bonus 🎉

                                      Meat Beats: https://meatbeats.com
                                      Klippr Video: https://klippr.video

                                      David HealeyD 1 Reply Last reply Reply Quote 2
                                      • ChazroxC
                                        Chazrox @dannytaurus
                                        last edited by

                                        @dannytaurus You just upped everyones combo box game. haha. 🔥

                                        1 Reply Last reply Reply Quote 1
                                        • ILIAMI
                                          ILIAM
                                          last edited by

                                          @dannytaurus @David-Healey Doesnt work on older Version!
                                          I see a White Bg Here!
                                          Did you Guys Changed the Source code?

                                          David HealeyD 1 Reply Last reply Reply Quote 0
                                          • David HealeyD
                                            David Healey @ILIAM
                                            last edited by

                                            @ILIAM said in Look & Feel - ComboBox Background.:

                                            Did you Guys Changed the Source code?

                                            Yes you'll need to wait for Christoph to merge it, use one of our forks, or make your own fork and pull in the PRs.

                                            Free HISE Bootcamp Full Course for beginners.
                                            YouTube Channel - Public HISE tutorials
                                            My Patreon - HISE tutorials

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

                                            15

                                            Online

                                            2.1k

                                            Users

                                            13.1k

                                            Topics

                                            113.3k

                                            Posts