HISE Logo Forum
    • Categories
    • Register
    • Login

    Multiple page?

    Scheduled Pinned Locked Moved General Questions
    23 Posts 4 Posters 5.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.
    • alexaudio10A
      alexaudio10
      last edited by

      Could you put an example? I have a hard time doing what I want ... I know it's simple!

      I only want that when I click on a button, a page opens with new control.

      I found in the API parent parent, but it does not work.

      A big thank you for your help.

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

        That first example I posted shows everything you need, the buttons work for me so I'm not sure why it's not working for you.

        Here is a simpler example, I've added a child component to page 1. Important: by default button 1 is active but page 2 is displayed, some extra fiddling around would be required to fix this but I don't think it's necessary for the purpose of this example. Click button 2 first then button 1.

        HiseSnippet 1099.3ocsW0saaaCElx1Zq1atXcXO.B4JGfr.Ik3tATDrF6T2YrlT241rrqJnkniIrLofDkS8J5qwdl106kX2t2frCIkrjskMhG1DR.n9N+vuygGdzwCh3dj3XdDx3Kd6hPBx3KMGtfIlzcBlxP8u.Y7XyKwwBRjkFpyhPbbLwGYXT8kR.i50Ppm+9G5fCvLORNDBcMm5QdEcFUjiF97ehFDzC6SdKcVAsO84883rt7.dBvmpl1nPr2T7sjqvR0pXhlSI2EiLrMOw83noNi9syOV9byM2P+E0pQ13j233wOs2ut37NuYpsCNZZOjWRTDgItFLGYXZbO7XX9BepfGMTfEDvmU6v8WLbB+NldqulFSGEPju3fFBbRCi5NgF3OHKsEiPF0FjmDqpShei4kTe5R77j4WoDXkaQwzoQkUoTsUnjy1nTOdfuzAagdFEnWMM8dh4PuHZnHWhjaecJ5VXmVHpxeU0rKmIfz4wwDwORn2NQzxss8gOqYilMfCvXg0bbjUHbv4XclUlxXe+AXFIn0AJIGbjkM7mzJ06Rm05fIJ2AxbsWWzcTewDPxIaHgJHyzUMRm9gdvisc61aUK2MTacd6tUd6tFuc2Nuc2Juc2Buss60Km2tai24pUj2AiBTG9qR8WgGIodlvBrOCRuKgX4Ejt7YgbFr.zK8XZ8sYThPvYqcv1QA15fTg5cw0QsOoX5sIB6S4uLhmDB53Ttuc2kuk4.m1q6c2x893DlmfxYVb1UbA40rVG13iMp23SMVWx3wkIRxhHdP.IpLoxlWQ6vrVrjYiHQGAgVPBQoGcrUJp0YmkkJOrYi5eD9udgh045q5PXHh.aeVlX20EOFGDCxaT+SfJDX8NcVp1a0a5MCbFDPP2hUaG03g0NxSezUPQNqOiJdcHY465SiLDazxSghP4Y+hnprdIpkCsYOPTZ4DzMrZp5vJgpW3iS65oKyPTnWWcyzSFj5jq3W3P6g4tqadJQJZdyTyUWSUV2vL6hYl4EPPuq+EXAV1UOMjfvLjDInxCHiKHygu1p6wW27BR7TAODNGWdsFfWceUc1T66mappXPeP9ARIUWjsP2aCL8y9iznP0RSBbjgFHuGkD8cn6ueUT2hvyypaztWFJKom4CHsrICWq4UdvfJf8ncG4t+mD42iJMxSgQaFo6r7aUF8mvh7NbR+ZjWVsG9MMR+8Gfe2bzAX.FteR.Vr5TMxIASE.8.WYtg9x5zXpXQw6Q6wnN1kNpiSYWyefz8IlCnBuIky2JkvWnH8+a9lN3XSyWLdLwSjS1Zl8t4e6Th6AU9Ydhfxt8RrHhJKOtJY1Pn70i.LgA2ThkUJUjkZ52syJMGRX91YCUmJzQ9tQpPmLgnYXuH968zs.kil9HEBvIlZ.+5vuz.d2ZYeWIumAyK+dOOYh3aAlWtEt6sEmr2Vb5daQ681hmt2V7c6sEe+NrP9iSNOQvmouVfP+CyvxzSB
        

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

        1 Reply Last reply Reply Quote 0
        • staiffS
          staiff
          last edited by

          **hello !
          not working in the last github HISE version because of starting onInit: "content.setheight: ..."

          you must replace it by: "Content.makeFrontInterface(..., ...);"

          ;)**

          Excuse me i'm French.

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

            I'm using the latest version from GitHub - built on 6th December

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

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

              Content.setHeight() is still available so it should not be the culprit here.

              I found the smartest solution to handle multiple page logic is to write a function that shows and hides all pages at once and then just call this function from every button callback with the page you want to show as parameter. The advantage of this approach is that you can also put a function call to this function in you onInit callback to set the default view (and change this during development while you are working on a certain page)

              1 Reply Last reply Reply Quote 0
              • staiffS
                staiff
                last edited by staiff

                sorry for that, but just downloaded this repository (6Dec) and tried, but: NO. With content set Height i just have a small Y black rectangle, no interface.
                as i wrote before.

                funny ....

                for multiples pages , also see: http://forum.hise.audio/topic/117/multiple-interfaces

                tried this snippet, and with some ajustments it works.

                your setheight:
                alt text

                the content.makefrontinterface:

                alt text

                Excuse me i'm French.

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

                  Content.setHeight() sets only the height, but the width is zero. So you need add Content.setWidth() or just call Content.makeFrontInterface() to save some typing :)

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

                    I was just working in the Main Workspace so there was no need to set a width.

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

                    1 Reply Last reply Reply Quote 0
                    • alexaudio10A
                      alexaudio10
                      last edited by

                      Hello,

                      I have two versions, version 1.1.1, which I keep for my old project (there are .js commands) that does not work on the Other. And the last of github that I compile.

                      On both it does not work, I have no idea why. When I click on the button, no page closes or opens ... Nothing happens.

                      In the last example, I do not see the green scriptpanel. Yet, nothing to do with the buttons .... And that's on both versions.

                      I can have misery!

                      1 Reply Last reply Reply Quote 0
                      • alexaudio10A
                        alexaudio10
                        last edited by

                        Good! It still does not work after several hours of work ....

                        Here is the code:

                        const var page1 = Content.addPanel("page1", 18, 290);
                        // [JSON page1]
                        Content.setPropertiesFromJSON("page1", {
                        "width": 300,
                        "height": 200,
                        "itemColour": 4294901845,
                        "itemColour2": 4294901845
                        });
                        // [/JSON page1]
                        page1.set("height", 200);
                        page1.set("width", 300);
                        page1.set("itemColour", 0xFFFF0055);
                        page1.set("itemColour2", 0xFFFF0055);

                        const var page2 = Content.addPanel("page2", 103, 0);
                        // [JSON page2]
                        Content.setPropertiesFromJSON("page2", {
                        "width": 300,
                        "height": 200,
                        "itemColour": 4278255445,
                        "itemColour2": 4278255445
                        });
                        // [/JSON page2]
                        page2.set("height", 200);
                        page2.set("width", 300);
                        page2.set("itemColour", 0xFF00FF55);
                        page2.set("itemColour2", 0xFF00FF55);

                        const var button1 = Content.addButton("button1", 0, 210);
                        // [JSON button1]
                        Content.setPropertiesFromJSON("button1", {

                        });
                        // [/JSON button1]
                        button1.set("radioGroup", 1);

                        const var button2 = Content.addButton("button2", 0, 310);
                        // [JSON button2]
                        Content.setPropertiesFromJSON("button2", {

                        });
                        // [/JSON button2]
                        button2.set("radioGroup", 1);

                        If anyone sees an error, please help me! I based myself on the HiseSnippet you sent me!

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

                          Well I can see you're using JSON and control.set() you only need to use one. Also you've only posted the contents of your on init callback. What's not working exactly?

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

                          1 Reply Last reply Reply Quote 0
                          • alexaudio10A
                            alexaudio10
                            last edited by

                            Hello,

                            Everything is now Ok! It remains for me to focus on my plugin! Thank you all.

                            1 Reply Last reply Reply Quote 1
                            • alexaudio10A
                              alexaudio10
                              last edited by

                              Hello,

                              One last thing. When I recall my presets, it is not page 1 which comes back (bg1) .... Why?

                              Is there a way to say that page one is master?

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

                                You need to exclude the buttons from being saved / restored in a preset. Just set the „saveInPreset“ property to false.

                                1 Reply Last reply Reply Quote 0
                                • alexaudio10A
                                  alexaudio10
                                  last edited by

                                  Hello,

                                  I think it works. At least, each time I change the preset the mastre remains in place.

                                  It's normal when I recompile, I have to press on a tabs for it to come back ...? In any case, I think it's ok.

                                  1 Reply Last reply Reply Quote 0
                                  • staiffS
                                    staiff
                                    last edited by staiff

                                    hello !
                                    in my example shown above all working with 8 panels.
                                    the problem seems that each time i open the project/or the compiled VST all the Panels are visible.
                                    i must click on the Tab1 to have only one.
                                    why ?

                                    Excuse me i'm French.

                                    1 Reply Last reply Reply Quote 0
                                    • staiffS
                                      staiff
                                      last edited by

                                      Fixed !
                                      problem found/solved by myself.

                                      Excuse me i'm French.

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

                                      55

                                      Online

                                      1.7k

                                      Users

                                      11.7k

                                      Topics

                                      101.8k

                                      Posts