HISE Logo Forum
    • Categories
    • Register
    • Login

    Change order of childComponents inside panel?

    Scheduled Pinned Locked Moved Scripting
    41 Posts 6 Posters 2.4k 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.
    • LindonL
      Lindon @ulrik
      last edited by

      @ulrik well you definitely will need to set the parentComponent.....

      HISE Development for hire.
      www.channelrobot.com

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

        @ulrik No idea, you're in uncharted waters, I don't think it's going to work no-matter what you do.

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

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

          @Lindon even if I already have them like this
          Skärmavbild 2021-03-13 kl. 15.13.24.png

          Skärmavbild 2021-03-13 kl. 15.12.59.png

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

          LindonL ulrikU 2 Replies Last reply Reply Quote 0
          • LindonL
            Lindon @ulrik
            last edited by

            @ulrik said in Change order of childComponents inside panel?:

            @Lindon even if I already have them like this
            Skärmavbild 2021-03-13 kl. 15.13.24.png

            Skärmavbild 2021-03-13 kl. 15.12.59.png

            each of those has its parentComponent set....

            copy out this JSON , reorder them then copy that JSON and compare the two....but like Dave says - dont know if it will work even then.

            HISE Development for hire.
            www.channelrobot.com

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

              @Lindon @d-healey I copied the whole "PNL" JSON, rearranged the childComponents and pasted it in side the "setPropertiesFromJSON" but with no luck, so pasted the rearranged ordered data into the "PNL" JSON and hit apply, and voila, it worked 😲

              Would it then, not be possible to script this outside the JSON?

              Skärmavbild 2021-03-13 kl. 15.24.38.png

              Skärmavbild 2021-03-13 kl. 15.25.09.png

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

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

                @ulrik why dont you try it and see? Tell us what you find...

                PNL.set("childComponents',YourTextString);

                HISE Development for hire.
                www.channelrobot.com

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

                  @Lindon I just told you 😀

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

                  LindonL ulrikU 2 Replies Last reply Reply Quote 0
                  • LindonL
                    Lindon @ulrik
                    last edited by

                    @ulrik sorry pressed submit too soon, try the set command...see above..

                    HISE Development for hire.
                    www.channelrobot.com

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

                      @Lindon sorry I misunderstood you

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

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

                        @Lindon Haha...no problem

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

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

                          @ulrik said in Change order of childComponents inside panel?:

                          @Lindon Haha...no problem

                          I'm sure you wont, but dont forget to escape the quotes....

                          HISE Development for hire.
                          www.channelrobot.com

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

                            Don't. The order of the UI elements will be used in the preset storage, also the UI element hierarchy is not supposed to be changed (actually I'm not even sure if you can change the parentComponent property after onInit.

                            If you need dynamic UI elements, consider using the ScriptPanel.addChildPanel() method which can be used to dynamically create (and delete) ScriptPanels inside another Panel (they won't show up in the UI component tree and are only accessible by scripting).

                            Take a look at this example for how to use this feature:

                            404 Not Found

                            favicon

                            (docs.hise.audio)

                            ulrikU 2 Replies Last reply Reply Quote 2
                            • ulrikU
                              ulrik @Christoph Hart
                              last edited by

                              @Christoph-Hart thank you Christoph, I'll take a look :)

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

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

                                @Christoph-Hart This is fantastic, this solves my reorder problems. I didn't know this was available in Hise, I get surprised all the time :)
                                Thank you!

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

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

                                  Yes I kind of sneaked that one in a few months ago, mostly because of the necessity of displaying pending downloads & expansions.

                                  ulrikU 1 Reply Last reply Reply Quote 1
                                  • ulrikU
                                    ulrik @Christoph Hart
                                    last edited by

                                    @Christoph-Hart how do you set the z depth for the childPanels?
                                    It doesn't seem to follow the index order in the childPanel array.

                                    The latest created child should be on top of all, that's working, however if I changed the order inside the childPanels array, it doesn't change the z-depth.

                                    Is it possible to change it?
                                    childpanels.gif

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

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

                                      @ulrik example snippet

                                      HiseSnippet 2655.3ocuZstbaiaElJIzI1Yc6lN8O8en5GYnpUTjbbtrMMasrjbVMqrrpkr6EOotzjPRnghTKIjkU20yryz7f0Gk9Hz2fsG.dAf2jjcmTlLVCANGfO7ctfCHYOWGCrmmiqRgMGrXJVovWn1egMcbiw5Dak1MUJrsZiwDKyd51XKOkCVLU2yCapTnv8eOSjBa9.E90+42eftktsAVzjhxYNDCbGxDBUzZu8+Vhk0g5l3AjIRRu29sMbra3X4LCfy8UqpLU23i5ivc0YhcOUkBazxjPcb6S0oXOkBO3.GyE8G6L21W9yHdjKsvrapozGFH+lOzwxjgXVqJ9KlvksmBLJ8Djv88Igeo5QDSRT6Bx3K4cfDZHyGEt2xfWMY3Uc8gWAI38.e38D09FtjoTQOLr8X011Tr6PcvDH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WobH3GTXY7XzpHOVL4xjMfRrPWGJ9XasRa88as4V2rEJYWCGlYeAClE1MytYu4J2konl8rIWhcCY5PAUJ7f3uiH07eGQxuBKCetQRPG611D5wSw148liTBHTEkBaDfJPTJ+MH8KBdCRXyyH34ScboJDS.bpm0SgiX4WhmRRs+YAZevLJ0wlqopZ8lMWCU2N7UWwddybM2TMvoHR6MtMS71pRgQ2Mr+X0Hen61.7D0DGSOig4z1MgcuYuOu.yBXplhcoDlWPgl3qHFX+2t2lpMwdej5LUovCiBDTJ7nUa4tV9kotPbSy84OP7nF9WWtuegGQs7umsOghmD9xW+B0ce4KdwdU26q180JWNRp48dyte0qdM7G9BIBbOLOq6OWM1SqTFhJJKjuIND2+uIfXj+vTdVGookupiAjGGGHczuT3l4WLsLDdDmk1HID135fFRvR.qx19DVtpd5StTWYHXJYU7Hj3o6mBjIo.Aet4Fe5Se5mXpcUXXuZg.mtj18bi4DKme76jM56se9LZjeAw6HmIvzn6tvOMh+5aa1Hidp+ikOFZdXd76FprJ7xCM+3eHAZT9qYfF+IeK0Z6VEcM5MUyhGVVBj004R4q2Osk0S+JnnxdtXXWFet3J42WeFjvJyFkmow7NYZVODHmLKOiw28Yb9SmKLOT7w6FJR+4P7kpG4XNyRmF+K0f84oDzAr0brOIB1m8fsGgtP9yW4yxmuw5B2mn1iPMFmMduWF3E1I4yMdC9XX1Vs0vgXCp.rOP8v+zm+u7EE+2A6H3XztDvIRs6rI8g7lFX.I17uFIHc48XYK8uuZX5y9XaS9M+DbEzYM18EB5rVXmJSzMbctvveOd1mayi3s.Xxl+UGso5Qr6Q0B2RWUsZkpJSHljKLLXTwy.rmsN6dGz4E2Ac16NnyKuC57p6fNu9NnyaVpNrO.q5ynNS7CSfF50hWZUgBsr0AuLtGox+ksZExz
                                      

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

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

                                        Jupp, valid request. Let me check how easy it is to implement...

                                        ulrikU 1 Reply Last reply Reply Quote 2
                                        • ustkU
                                          ustk
                                          last edited by ustk

                                          I always wanted to do such a thing, but since it is not actually doable with panels I used object painting in one unique panel. Still very verbose to paint the object in a certain order but it is a viable solution...

                                          Another situation where Z depth would be awesome is when you have multiple components you want to hide/show. Let say ADSR curves. If you want to see all of them but make one modifiable, it has to be on top of the others. The actual workaround is to make dummy curves behind, and only show the real component you want to modify... Well, it doesn't seem very clear once explained, but I assure you, it is clear in my head! 😛

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

                                          1 Reply Last reply Reply Quote 2
                                          • ulrikU
                                            ulrik @Christoph Hart
                                            last edited by

                                            @Christoph-Hart Great!

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

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

                                            15

                                            Online

                                            1.7k

                                            Users

                                            11.9k

                                            Topics

                                            103.4k

                                            Posts