HISE Logo Forum
    • Categories
    • Register
    • Login

    How to change ComboBox row height?

    Scheduled Pinned Locked Moved Scripting
    32 Posts 4 Posters 1.5k 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.
    • d.healeyD
      d.healey
      last edited by

      @ustk I think I'm getting somewhere.

      @Christoph-Hart Can you explain this? https://github.com/christophhart/HISE/blob/develop/hi_core/hi_core/MacroControlledComponents.h#L375

      Setting it to 1 will allow the overridden showPopup() function to work and in there we have access to the row height property on line 408: withStandardItemHeight()

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

      ustkU 1 Reply Last reply Reply Quote 1
      • ustkU
        ustk @d.healey
        last edited by

        @d-healey Nice one, there's the showPopup override here I was looking for! I'm sure my eyes slipped over it hundreds of times...

        Can't help pressing F5 in the forum...

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

          @ustk I've added the property, the last thing to do is get the property into the showPopup function. I'd also like to know why Christoph is using the #if...

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

          ustkU 1 Reply Last reply Reply Quote 0
          • ustkU
            ustk @d.healey
            last edited by ustk

            @d-healey Nice!
            If you struggle with the property I'll be back tomorrow to help...

            Can't help pressing F5 in the forum...

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

              @ustk Yeah I'm giving up on it for today. I'll wait for you :) Just need to figure out how to pass the property from the ScriptComboBox to HiComboBox

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

              ustkU 2 Replies Last reply Reply Quote 0
              • ustkU
                ustk @d.healey
                last edited by

                @d-healey that is the hard part I'm not sure how to do…

                Can't help pressing F5 in the forum...

                1 Reply Last reply Reply Quote 0
                • ustkU
                  ustk @d.healey
                  last edited by

                  @d-healey please share the branch with me so I can have a look tomorrow git -> ustk

                  Can't help pressing F5 in the forum...

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

                    @ustk https://github.com/davidhealey/HISE/tree/comboBoxHeight

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

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

                      Any hints @Christoph-Hart ?

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

                      Christoph HartC 1 Reply Last reply Reply Quote 0
                      • Christoph HartC
                        Christoph Hart @d.healey
                        last edited by Christoph Hart

                        Yeah, this is one of a classic case of "Too late to the party and too lazy to catch up"...

                        But adding a showPopup() method is not as easy as it looks because there is a strict decoupling of the scripting objects that are representing a UI element and the actual element (because the actual UI element has a much shorter lifespan and can exist multiple times).

                        A much more simple approach would be using this method:

                        Link Preview Image
                        JUCE: PopupMenu::LookAndFeelMethods Struct Reference

                        favicon

                        (docs.juce.com)

                        and add a scripting layer to access it through a LAF object.

                        Christoph HartC 1 Reply Last reply Reply Quote 0
                        • Christoph HartC
                          Christoph Hart @Christoph Hart
                          last edited by

                          Wrong link, I meant the getIdealPopupMenuItemSize a little bit above...

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

                            @Christoph-Hart

                            Too late to the party and too lazy to catch up"...

                            No need to add the showPopup any more. We can change the property directly. I've added the property here https://github.com/davidhealey/HISE/tree/comboBoxHeight

                            But I don't understand how to pass it from ScriptComboBox to HiComboBox.

                            And I'm curious to know why you did this https://github.com/christophhart/HISE/blob/develop/hi_core/hi_core/MacroControlledComponents.h#L375

                            and add a scripting layer to access it through a LAF object.

                            I think the property approach is more straightforward...

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

                            Christoph HartC 1 Reply Last reply Reply Quote 0
                            • Christoph HartC
                              Christoph Hart @d.healey
                              last edited by

                              I would like to keep the amount of properties as low as possible, also there might be other use cases where this could come in handy.

                              The addition was super simple.

                              Link Preview Image
                              - added ScriptLookAndFeel.getPopupMenuItemSize() · christophhart/HISE@24c8360

                              The open source framework for sample based instruments - - added ScriptLookAndFeel.getPopupMenuItemSize() · christophhart/HISE@24c8360

                              favicon

                              GitHub (github.com)

                              HiseSnippet 970.3ocsV0uaaaCDmxIZXV6CzBrG.h7WN.YtxoIoCHXXowIdyXIoFycECXXnil5rEWjHEHoZh2PA1yyd51av1QIYI4U2hBiUAXCce763Od7tiZhVwAiQoIdce9xLf38o9SWJswCiYBIY7EDuO2+ZlwBZZopyWlwLFHh34sy25T30cWRwye+MmyRXRNznhPdgRvgqDoBai1Im88hjjQrH34hzVdezYi4J4PUhJG4yN9gjLF+V1B3FlysN9DuO5xHgUomZYVvP718bUzxowp6jk9+BgQLKAbBCHSw.UpdjJIxwXmVxvXQRzjU6aCAixjlrvNkYguv+ZQjnVeS13AEFnMHZmO75rN81YM5MnM8BaQuMPIuVTZ2RJ8P+obsHy1XwwmOwerDOblyvzdapT5Koye0wenB8PZ6mxtEFoQgZD8NIL7.J929mFDfodik9JllZneMcEHtFv8xUJNK4Jk51mJiFAPRu0Avm0BwBvNTklojnPu8vWmoNWc+f8JfLquAruQzLNal9ZXgvUoMJWxsBkr2dXrFGArjIpr7rqAY9XKjNU76vdGPmuxK0rea+f+Hn6idD86.MPYtez4vc3aKxSQZXNflJVDaoy.pZN0nRAZtAJewh0f862OnKtALpDnelVfL2pcIHWrQx0sH51XgodYov8Y.2ZnfvFicGLItbZ1RpBemZDxEI.UlmNyYyTfWC1bsDyXI4PPWZSLuCaGnXhAk.THxFSsJ5gggXTinwPA2QMGG5vTEle9P2g2wg+xozUACCgoHFMPNAgTA3jvSCd89mVuATxaTV3YxdEYufWGP+ullOei1bmzZURBn2nYWSs9cArWYZ4fxLQsiXk95sO9u81m1c27xBuVNpjikB6yx.4aqmmTUs5Z0pXE5psnQ6AUMZqJcIhHWeVckLof1sm6Q9wwWvrrUACiKtVYf1JbaCuKfWgCAK6h65eAXt0pxJ7spMAmq8dtz2Wur+4hyVVK7qyNKkg1787QIA1jXb3FDbXviCNJ3Xbl6aLOAmjohxSX10Gu4loWY.OzValhatgzHrKau2+eal26KEen+DgkGuYN1YCbDOV9PvwpaJ9L+KmOGGDzPvc8G8SeXtVf7CpbKNY4ZlUKbG22jmNEurjC3pKkPhqowqiq7tTNzI6x.SAYTgv+fOUFG3j8pLNXkQRJiqUujW1T3tK5iKzfbRVbMbW76APYZcefueX+PRJds3K4b21+KwNtMi4vs.yi2BLGsEXNdKvbxVf4IaAlu5chw8EIOM2pRKaGPEStrXdjm2kRFVYUTER9W.kkguiC
                              
                              Christoph HartC 1 Reply Last reply Reply Quote 2
                              • Christoph HartC
                                Christoph Hart @Christoph Hart
                                last edited by

                                And I'm curious to know why you did this

                                No idea, but my educated guess is that I needed to customize the behavior of the combobox at some ancient point in history (perhaps to scale with the zoom factor) and then it got implemented in JUCE so I removed it again.

                                From looking at it there's not much use to it.

                                d.healeyD 1 Reply Last reply Reply Quote 1
                                • d.healeyD
                                  d.healey @Christoph Hart
                                  last edited by

                                  @Christoph-Hart

                                  The addition was super simple

                                  Oh thank you! I'm building now.

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

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

                                    I've added the documentation for this and the drawPresetBrowserIcons LAF function.

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

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

                                    27

                                    Online

                                    1.8k

                                    Users

                                    11.9k

                                    Topics

                                    104.0k

                                    Posts