<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Switch to the same panel with different buttons (different buttons send to, toggle the same panel)]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Just wondering a question,</p>
<p dir="auto">How can I manage toggling a panel with 4 different buttons (they are the same but not in the same page/panel).</p>
<p dir="auto">By example the setting page, the X page, the Y page... have all 1 button in each called Panel1 (Total 4 buttons called each Panel1). *Panel1 is the destination.</p>
<p dir="auto">How to manage them so they toggle the panel1 (is it possible without array?)</p>
]]></description><link>https://forum.hise.audio/topic/14741/switch-to-the-same-panel-with-different-buttons-different-buttons-send-to-toggle-the-same-panel</link><generator>RSS for Node</generator><lastBuildDate>Thu, 14 May 2026 00:37:08 GMT</lastBuildDate><atom:link href="https://forum.hise.audio/topic/14741.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 13 May 2026 16:30:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Switch to the same panel with different buttons (different buttons send to, toggle the same panel) on Wed, 13 May 2026 21:44:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/12">@David-Healey</a> I think the OP has one panel and 4 buttons in different places, and each button needs to show/hide the panel.</p>
<p dir="auto">Like a global Settings panel that can be opened by a button in the main UI, or a button on the Effects page, or a button on the Arpeggiator page.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/4725">@Yannrog</a> is this what you're trying to do? If so, something like this will work:</p>
<pre><code>const pnlSettings = Content.getComponent("pnlSettings");
const btnSettings = Content.getAllComponents("btnSettings");

for (b in btnSettings) b.setControlCallback(btnSettingsControl);

inline function btnSettingsControl(component, value) {
	if (value) {
		for (b in btnSettings) {
			if (b != component) b.setValue(0);
		}
	}

    pnlSettings.showControl(value);
}
</code></pre>
<p dir="auto">Your buttons can be <code>btnSettingsMain</code>, <code>btnSettingsEffects</code>, etc.</p>
<p dir="auto">Or, simpler: <code>btnSettings1</code>, <code>btnSettings2</code>, etc. as long as they all start with <code>btnSettings</code></p>
<p dir="auto">Same code, but fully commented, in case it helps:</p>
<pre><code># Find the panel you want to show/hide
const pnlSettings = Content.getComponent("pnlSettings");

# Find all the buttons that need to toggle the panel:
# btnSettingsMain, btnSettingsEffects, etc.
const btnSettings = Content.getAllComponents("btnSettings");

# Set the function that is called when any of the buttons are clicked
for (b in btnSettings) b.setControlCallback(btnSettingsControl);

# The function that shows/hides the panel when a button is clicked
inline function btnSettingsControl(component, value) {
    # If the button is clicked 'on', turn off all the other buttons
	if (value) {
        # Check every button in btnSettings
		for (b in btnSettings) {
            # If it's a different button, turn it off
			if (b != component) b.setValue(0);
		}
	}

    # Set the panel visibility to the value of the button:
    # Button on gives value of 1, which shows the panel
    # Button off gives value of 0, which hides the panel
    pnlSettings.showControl(value);
}
</code></pre>
<p dir="auto"><img src="/assets/uploads/files/1778708670670-cleanshot-2026-05-13-at-22.43.38.gif" alt="CleanShot 2026-05-13 at 22.43.38.gif" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.hise.audio/post/120294</link><guid isPermaLink="true">https://forum.hise.audio/post/120294</guid><dc:creator><![CDATA[dannytaurus]]></dc:creator><pubDate>Wed, 13 May 2026 21:44:50 GMT</pubDate></item><item><title><![CDATA[Reply to Switch to the same panel with different buttons (different buttons send to, toggle the same panel) on Wed, 13 May 2026 19:54:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/12">@David-Healey</a> Ok</p>
<p dir="auto">Thank you</p>
]]></description><link>https://forum.hise.audio/post/120292</link><guid isPermaLink="true">https://forum.hise.audio/post/120292</guid><dc:creator><![CDATA[Yannrog]]></dc:creator><pubDate>Wed, 13 May 2026 19:54:36 GMT</pubDate></item><item><title><![CDATA[Reply to Switch to the same panel with different buttons (different buttons send to, toggle the same panel) on Wed, 13 May 2026 19:53:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/4725">@Yannrog</a> It's always easier if you name your components consistently.</p>
<p dir="auto">Think like this for panel names, pnlPage0, pnlPage1, pnlPage2, etc.</p>
]]></description><link>https://forum.hise.audio/post/120291</link><guid isPermaLink="true">https://forum.hise.audio/post/120291</guid><dc:creator><![CDATA[David Healey]]></dc:creator><pubDate>Wed, 13 May 2026 19:53:14 GMT</pubDate></item><item><title><![CDATA[Reply to Switch to the same panel with different buttons (different buttons send to, toggle the same panel) on Wed, 13 May 2026 19:47:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/12">@David-Healey</a> Or maybe, I should rethink my interface.</p>
<p dir="auto">Buttons below and panels switching above. It would be easier.</p>
]]></description><link>https://forum.hise.audio/post/120290</link><guid isPermaLink="true">https://forum.hise.audio/post/120290</guid><dc:creator><![CDATA[Yannrog]]></dc:creator><pubDate>Wed, 13 May 2026 19:47:21 GMT</pubDate></item><item><title><![CDATA[Reply to Switch to the same panel with different buttons (different buttons send to, toggle the same panel) on Wed, 13 May 2026 19:40:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/12">@David-Healey</a>  I would like to achieve something like on your video,</p>
<p dir="auto"><a href="https://www.youtube.com/watch?v=akMfRpFYOP8" rel="nofollow ugc">https://www.youtube.com/watch?v=akMfRpFYOP8</a></p>
<p dir="auto">However the name of the buttons are specific to the panel</p>
<p dir="auto">Is it possible without a loop?</p>
]]></description><link>https://forum.hise.audio/post/120289</link><guid isPermaLink="true">https://forum.hise.audio/post/120289</guid><dc:creator><![CDATA[Yannrog]]></dc:creator><pubDate>Wed, 13 May 2026 19:40:23 GMT</pubDate></item><item><title><![CDATA[Reply to Switch to the same panel with different buttons (different buttons send to, toggle the same panel) on Wed, 13 May 2026 19:20:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/4725">@Yannrog</a> Not sure what you're asking</p>
]]></description><link>https://forum.hise.audio/post/120288</link><guid isPermaLink="true">https://forum.hise.audio/post/120288</guid><dc:creator><![CDATA[David Healey]]></dc:creator><pubDate>Wed, 13 May 2026 19:20:26 GMT</pubDate></item><item><title><![CDATA[Reply to Switch to the same panel with different buttons (different buttons send to, toggle the same panel) on Wed, 13 May 2026 18:27:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/12">@David-Healey</a> Hi,</p>
<p dir="auto">Thank you for your response, wow this is great. Ok, can the second part be done. If any of them is 1,</p>
<p dir="auto">show the panel?</p>
]]></description><link>https://forum.hise.audio/post/120287</link><guid isPermaLink="true">https://forum.hise.audio/post/120287</guid><dc:creator><![CDATA[Yannrog]]></dc:creator><pubDate>Wed, 13 May 2026 18:27:11 GMT</pubDate></item><item><title><![CDATA[Reply to Switch to the same panel with different buttons (different buttons send to, toggle the same panel) on Wed, 13 May 2026 16:40:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/4725">@Yannrog</a> Each component needs to have a different name.</p>
<p dir="auto">There are different ways to do this depending on how your project is set up and how you want things to behave.</p>
<p dir="auto">The simplest is to have a single callback function applied to all the buttons. Then in the callback you can check the value of all the buttons, if any of them are 1 you show the panel.</p>
]]></description><link>https://forum.hise.audio/post/120286</link><guid isPermaLink="true">https://forum.hise.audio/post/120286</guid><dc:creator><![CDATA[David Healey]]></dc:creator><pubDate>Wed, 13 May 2026 16:40:15 GMT</pubDate></item></channel></rss>