Forum
    • Categories
    • Register
    • Login

    Radio Buttons Tab Controls || Tabs overlapping on INIT.

    Scheduled Pinned Locked Moved Scripting
    22 Posts 2 Posters 2.2k 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.
    • David HealeyD
      David Healey @Chazrox
      last edited by

      @Chazrox said in Radio Buttons Tab Controls || Tabs overlapping on INIT.:

      I'd have to chase down every mention of these.

      Find/replace can do this.

      But it's not going to hurt your project to do it manually as you are, it's just more work, and harder to maintain in the future - or as you've found out, right now ;)

      Free HISE Bootcamp Full Course for beginners.
      YouTube Channel - Public HISE tutorials
      My Patreon - HISE tutorials

      ChazroxC 1 Reply Last reply Reply Quote 0
      • ChazroxC
        Chazrox @David Healey
        last edited by Chazrox

        @d-healey idk how to use FindReplace in that way. I tried something like that before but it didnt go well.

        So are you saying theres no other way to just write an array manually with my buttons and panels with their unique names?

        i REALLY dont want to change their names.

        David HealeyD 1 Reply Last reply Reply Quote 0
        • David HealeyD
          David Healey @Chazrox
          last edited by

          @Chazrox Yeah with the names you're using you'll need to write them manually, but the code you posted above looks fine.

          Free HISE Bootcamp Full Course for beginners.
          YouTube Channel - Public HISE tutorials
          My Patreon - HISE tutorials

          ChazroxC 1 Reply Last reply Reply Quote 0
          • ChazroxC
            Chazrox @David Healey
            last edited by Chazrox

            @d-healey ok. I got them scripted, only two of them are working properly and the others are giving '.setValue' errors. They are declared above so they should be seen. Can you look at this please.

            Excuse my comments, im not deleting anything until I get this working. 🙏

            //! SWITCH PANEL CONTROLS 
            const var pnlFeatureStrum = Content.getComponent("pnlFeatureStrum");
            
            
            const var switchPanelsList = [
            
            pnlFeatureStrum, 
            PnlFeaturePluck, 
            pnlFeatureArp, 
            pnlEditMode
            ];
            
            const var switchButtonsList = [
            btnStrumEnable, 
            btnPluckEnable, 
            btnArpEnable, 
            btnNormal
            ];
            
            
            
            inline function switchPanel(button)
            {
            	for (sb = 0; sb < switchButtonsList.length; sb++)
            	{
            		switchButtonsList[sb].setValue(switchButtonsList[sb] == button);
            		switchPanelsList[sb].showControl(switchButtonsList[sb] == button);
            	}
            }
            
            //! EDIT MODE ENABLE BUTTON CONTROLS
            inline function onbtnNormalControl(component, value)
            {
            //	if (value)
            //	{
            //		pnlEditMode.showControl(true);		
            //	}
            //	 else
            //	{
            //		pnlEditMode.showControl(false);
            //	}
            	//Console.print(switchPanelsList[1] + "PANEL LIST");
            	
            	switchPanel(component);
            
            };
            Content.getComponent("btnNormal").setControlCallback(onbtnNormalControl);
            
            
            
            //! PLUCK ENABLE BUTTON CONTROLS;
            inline function onbtnPluckEnableControl(component, value)
            {	
            //	if (value)
            //	{
            //		PnlFeaturePluck.showControl(true);
            //	}
            //	else
            //	{
            //		PnlFeaturePluck.showControl(false);
            //	}
            
            	switchPanel(component);
            };
            
            Content.getComponent("btnPluckEnable").setControlCallback(onbtnPluckEnableControl);
            
            
            //! STRUM ENABLE BUTTON CONTROLS
            inline function onbtnStrumEnableControl(component, value)
            {
            //		if (value)
            //		{
            //			//btnStrumNatural.setValue(1);
            //			//btnStrumNatural.changed();
            //		//	btnStrumNatural.set("enabled", 1);
            //			//btnStrumReleaseMode.set("enabled", 1);
            //			pnlFeatureStrum.showControl(true);
            //		}
            //
            //		else
            //		{
            //			//btnStrumNatural.setValue(0);
            //			//btnStrumNatural.changed();
            //			//btnStrumNatural.set("enabled", 0);
            //			//btnStrumReleaseMode.set("enabled", 0);
            //			
            //		//	pnlFeatureStrum.showControl(false);
            //		}
            
            	switchPanel(component);
            };
            
            Content.getComponent("btnStrumEnable").setControlCallback(onbtnStrumEnableControl);
            
            //! ARP ENABLE BUTTON CONTROLS
            inline function onbtnArpEnableControl(component, value)
            {
            	switchPanel(component);
            
            
            	if (value)
            	{
            		Arpeggiator1.setBypassed(false);
            	//	pnlFeatureArp.showControl(true);
            		knbStepRepeat.changed();
            		SliderPack1.sendRepaintMessage();
            		SliderPack3.sendRepaintMessage();
            
            		
            	}
            	else
            	{
            		Arpeggiator1.setBypassed(true);
            		
            		//cmbArpType.setValue(1);
            		cmbArpType.changed();
            	//	pnlFeatureArp.showControl(false);
            	}
            	
            
            };
            
            Content.getComponent("btnArpEnable").setControlCallback(onbtnArpEnableControl);
            
            
            

            pnl Tabs Not Working.gif

            David HealeyD 1 Reply Last reply Reply Quote 0
            • ChazroxC Chazrox has marked this topic as unsolved on
            • David HealeyD
              David Healey @Chazrox
              last edited by

              @Chazrox I don't know which lines those errors are referring to in the script you posted.

              Free HISE Bootcamp Full Course for beginners.
              YouTube Channel - Public HISE tutorials
              My Patreon - HISE tutorials

              ChazroxC 1 Reply Last reply Reply Quote 0
              • ChazroxC
                Chazrox @David Healey
                last edited by Chazrox

                @d-healey

                errors here @ .setValue

                	for (sb = 0; sb < switchButtonsList.length; sb++)
                	{
                		switchButtonsList[sb].setValue(switchButtonsList[sb] == button);
                		switchPanelsList[sb].showControl(switchButtonsList[sb] == button);
                	}
                

                The other paired error on each call is the swithPanel(); function in each button. No other errors showing.

                David HealeyD 1 Reply Last reply Reply Quote 0
                • David HealeyD
                  David Healey @Chazrox
                  last edited by

                  @Chazrox So that means one of the buttons in your array isn't actually a button

                  Free HISE Bootcamp Full Course for beginners.
                  YouTube Channel - Public HISE tutorials
                  My Patreon - HISE tutorials

                  ChazroxC 1 Reply Last reply Reply Quote 0
                  • ChazroxC
                    Chazrox @David Healey
                    last edited by Chazrox

                    @d-healey

                    They definitely are tho...

                    Screenshot 2025-09-04 at 1.12.59 PM.png

                    Screenshot 2025-09-04 at 1.12.51 PM.png

                    Screenshot 2025-09-04 at 1.12.46 PM.png

                    Screenshot 2025-09-04 at 1.12.42 PM.png

                    They arent a knob or a slider for sure.

                    David HealeyD 1 Reply Last reply Reply Quote 0
                    • David HealeyD
                      David Healey @Chazrox
                      last edited by

                      @Chazrox It would work if they are knobs. That error is saying that it's not a valid component. Are you sure you have a reference to all of those buttons in your script?

                      You can Console.print(switchButtonsList[sb].getId()) within the loop and see at which point the error occurs.

                      Free HISE Bootcamp Full Course for beginners.
                      YouTube Channel - Public HISE tutorials
                      My Patreon - HISE tutorials

                      ChazroxC 2 Replies Last reply Reply Quote 0
                      • ChazroxC
                        Chazrox @David Healey
                        last edited by Chazrox

                        @d-healey

                        I got it,

                        one of the declarations was further down the script.....BIG FOREHEAD SLAP!
                        Slap me please. lol

                        Ok, now I have to do it for another set of 4 buttons 🤣 😭
                        here we go! lol.

                        Thank you for sticking it out with me! 🙏

                        //! LEARNED SOMETHING HERE

                        1 Reply Last reply Reply Quote 1
                        • ChazroxC
                          Chazrox @David Healey
                          last edited by

                          @d-healey I got the other group working too. Thank You! 🙏 That was a doozie. Im gonna name related panels and buttons for these use cases accordingly. I like doing this this way instead of radio button feature. That thing always glitches.

                          🙏

                          1 Reply Last reply Reply Quote 0
                          • ChazroxC Chazrox marked this topic as a regular topic on
                          • First post
                            Last post

                          26

                          Online

                          2.1k

                          Users

                          13.1k

                          Topics

                          113.8k

                          Posts