HISE Logo Forum
    • Categories
    • Register
    • Login

    Tabbed interface question...

    Scheduled Pinned Locked Moved General Questions
    3 Posts 2 Posters 278 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.
    • SteveRiggsS
      SteveRiggs
      last edited by

      When working with tabs and panels for a multi-page interface, is there a way to tell HISE to make a specific panel active when it initializes? Every time I hit compile or save it goes straight to Panel2 which is the effects page.

      I have 2 panels in this project and they are both set to radio group 1.

      //Tabs and panels
      
      const var NUM_BUTTONS = 2;
      const var buttons = [];
      const var panels = [];
      
      for (i = 0; i < NUM_BUTTONS; i++)
      {
          buttons[i] = Content.getComponent("Button" + (i+1));
          panels[i] = Content.getComponent("Panel" + (i+1));
          buttons[i].setControlCallback(onButtonControl);
      }
      
      inline function onButtonControl(component, value)
      {
          local idx = buttons.indexOf(component);
          
          for (i = 0; i < panels.length; i++)
          {
              panels[i].showControl(idx == i);
          }
          
      }
      

      www.anarchyaudioworx.com

      www.facebook.com/groups/audioworx/

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

        @SteveRiggs If you want panel 1 then disable the saveInPreset state for all buttons except the one that displays panel 1

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

        SteveRiggsS 1 Reply Last reply Reply Quote 2
        • SteveRiggsS
          SteveRiggs @d.healey
          last edited by

          @d-healey Ah! Easy as that! Works perfectly. Thanks dude ☺

          www.anarchyaudioworx.com

          www.facebook.com/groups/audioworx/

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

          21

          Online

          1.7k

          Users

          11.8k

          Topics

          102.4k

          Posts