TABS



  • How do you implement some tabs (like to switch from one option to the other)

    thanks in advance.



  • @jay Use panels to group your controls, then when you want to switch "tabs" just hide one panel and show another.



  • @d-healey When using tabs and refresh the template if goes to the 3rd option tab instead of the 1st.



  • @jay You'll have to post a HISE snippet or some code for me to be able to help you.



  • @jay You can see the BasicSynth HISE tutorial. There are several tabs in GUI.

    https://github.com/christophhart/hise_tutorial

    Cheers 😉



  • @d-healey

    Content.makeFrontInterface(1160, 670);

    include("VuMeter.js");

    include("UserPresetWidgets.js");

    // Set the position on the VuMeter by x, y
    const var v = VuMeter.createVuMeter("VuMeter", 1001, 442);

    // Get a reference to the master container
    VuMeter.setModule(v, Synth.getChildSynth("TiNES EP+"));

    // [/JSON Label] for Presets

    const var UpButton = UserPresetWidgets.createPresetButton("UpButton", 662, 88, true);
    const var DownButton = UserPresetWidgets.createPresetButton("DownButton", 461, 88, false);

    const var PresetDisplay = UserPresetWidgets.createPresetDisplay("PresetDisplay", 490, 85);

    //! =============================================================== Page Handling

    // Get these lines by selecting all controls and choose "Create Script Definition for selection"
    const var SynthPageButton = Content.getComponent("SynthPageButton");
    const var SettingsButton = Content.getComponent("SettingsButton");
    const var FXPageButton = Content.getComponent("FXPageButton");

    const var SynthPage = Content.getComponent("SynthPage");
    const var FXPage = Content.getComponent("FXPage");
    const var SettingsPage = Content.getComponent("SettingsPage");

    // Put them all in an array for better iterating.
    const var pages = [FXPage, SynthPage, SettingsPage];

    /** This function iterates the array, hides all pages and only shows the given page.

    • pageToShow is a reference to the control. Check the onControl callback to see what's going on.
      */
      inline function handlePages(pageToShow)
      {
      for(p in pages)
      p.set("visible", pageToShow == p);
      }

    // This page will be shown as default
    // If you're working on another page, just pass this is temporarily
    // so it doesn't switch back when compiling.
    handlePages(SynthPage);


Log in to reply
 

0
Online

306
Users

848
Topics

5.5k
Posts

Looks like your connection to Forum was lost, please wait while we try to reconnect.