Simple Hide/Show button



  • trying to make a button to show/hide panels. But can't figure it out. Any help? You may figure out I suck at coding 🙂

    HiseSnippet 890.3ocsVEsaSCCE0oqYZMPm.o8AD0m5jFPZYarABwXcanBrsJJLgDZBYRbWrVhcThCP0z9F32gm3484ve.buwIKoipwJRDoJUet9bywWe70YPrzkkjHiIFMd63HFw31lCGKT987obAo+NDiEM2mlnXw1ZnsGGQSRXdDCi4dABXznNI64mOaaZ.U3xJgHjijbW1q4gbUI5fsdEOHXOpG6s7vJyd0s56JE8jAxTPOyY5PhntmROgc.EmVMShw765wUx3gJphkPLpusza7Pe4WD54eDOg+o.FNnCYHjHM7dx.OTwHJomOOvaPw5Ng.YYPYUXNcUXIy84d7KwKqF2IKfcIip0CiZWm7572kmyzjmQE4UWKu6ZNzMlGoJifZ6Vl8EvF0HJrETUV54Rp0tlYOILCg59gzSY6ECCtjQ60cbVwdMGmkeRSqlVvFQhx9yzX6HpfEzw9o1EboddCPr1szgZshcWjaWfp0Cdf8Gd4vCOHm1wMsrJ3kvP8FwhUbVB7xCw4UIImYYa25KbOkeqGa+PHi3XeF+DeE.zMGfqXgZKB.tZ2McVeiM6r9itRrtSDz57qtn74dLbiYxk01oJkTztUQzVHsxkjumLC93+1R5R9XQQ+KawES83xWDKSi.40xoEpqQoBWEWJrkhCjJ1gh1KaclUCqystZjQilVHTJwxf.V7zhhGvhuFZsEogehEuBTTBRYEyC7YSZjm+lYjc0kkJSTJ5K3pCiX4iu9Shj75JZ5yEHLUUlkewbKudOhvgjXYVTnIYxuZeGx65uCUQKxDjzxMJ.aG1mg9R5CSML2gkbpRFAsX5ICijBTBF0uIu2uRLLMvW23h+PpjhEzonYwoUzomkgEL0tdM+KJ3uD7mrC.fnleEc5H5S.HxE4KsRaNh9su+ieMIZ2pvj+r6AzCS5kFPUS1XC6lmG.7HSzAA6RHR3pwU61OCc6btwMiuox8tlC3JW+oq2ZSQufS3+sdyu6no4tiFwbUkhst4du+e8hhYPJuQlp3hS1mph4nw5fzvgfcvkAJQ.1sDziUCsn5wNEd1gLgW1feAO4A6fiMxC1oHHIj5FK+nq9vId6zBYHflDYWR2.9ZAXrcmhijntCgqL+nqKVHtGn7oyn6Ly3gyLiUmYFqMyLVelY7nYlwFWCC76SddpRFpOV..C1MqUngwtBJ3pxbfjeK5.s5N
    


  • @hisefilo

    Radio button is a different thing. it's about group of buttons that when one button is on, others are off. In order to make a button that shows/hides content; you need to define an inline function like this:

    inline function onhideShowControl(number, value)
    {
            panel1.showControl(value); 
    }
    
    hideShow.setControlCallback(onhideShowControl);
    

    This is the snippet

    HiseSnippet 947.3ocsV8taSiDDecZ2JhOL5PhG.q7oTodfSnT9SEBtlRQg6ZaDAPHcBUs0dS8pZuqk85BQU8Y3dc3CH9LON7F.y30t1oDUZPBKEor+l423eytyLqGkp74YYpThU6WMMgSrtNc7ToNbPHSHIC2lXcC5trLMO00.s0zDVVFOfXYszyQ.q1KSJd95S1hEwj97ZHB4MJgO+eEwBcM5nm9OhnncXA7WIha385OcnuRNPEoxA8rD0ijv7OlcDeOF5VKJwh9r.gVkNVyz7Lh0xaoBlNNT8dow+2HxDGFwwE8Hig.Yf2QEEfJFQICBEQAipx6LBDkQ06BKY1EtEcWQf3b75ci+rvfaMil6GVstL406mKOu4IOqFxaYi7tIcrepHQWaA01ePGJgCpIL3HnorL9RZ8oVzAJvCo91wri46jBKNmQ2M77Vy8dddqtoisiMbPjocOgk5lvj7ndtO1shKKHXDh0siwTm0b6ib6CTsuycb+uWLd+8Jo8NGa6JdYbTuI7TsfmAu7XzuFA4TaW2NuWDnC67H26BQDWGxEGEpAf9k.BMO1Th.fq2+gda7fG1ai6eAa8mwn8YWLoBEAb7fY1zZqbsVI61oxZGjVcJEFnJfe2OKkNmOtoX9Ujbor.g54op7DPdc75ToKGagLRH4tSxk9ZgR5pjUw.eUopntx73C4oqApOJmupi8oNPDMOlcvam0vaiWa55XeFF9pfgBtzkArnnCg1qt+vqZ0MaHi8TZ99xtqZepca6yrunkISlmox.EwSmmUroO8RncgTszOn1e1lqUtZMW9lipFNpjCkB89I7x0W9zAR4YM1HVJPvUcQa3MJaCM0MDADDaZ0tIoP9MmERd8vsYZVUjffVW7.XayOAlUZZvaS2lmcrVk.i8FnhSTRTBVzqx68CfeV3qaZ0ez7O.jWgVXlzHdsMwyoZbBVHUDtqQMEUlf8kpfcK3OEcn.0UVyxjUlVTD4Kk4YceHh9+e7yeaVz9MgOo5byZIxONoCl2pBxiX5YGBi27TZ.pclYZGNQSlIzSadyzBLY16JewwUUt2jNRn8CmudaMG8BUH+t0a48bNzmMYB2WWK1ko671e0K0V.o7RUtVHOZWlNUf0X6kGOFpL74fRjPkWFVt0Ba+Lq8ppkGykAEK9F7TZrGt1pzXuJijXlep5.eSSKdS50JP.MIK9fh1vW1.qc6U0ph5NFtd+.eebi3u.kOeF8WXF2cgYr9By3dKLiMVXF2egY7fKgA9sT+ctVEaZKHjuqD1f2N
    


  • @orange thanks!!! Now it's working. Didn't know that.



  • @orange Radio button is a different thing. it's about group of buttons that when one button is on, others are off.

    Do you know how to do this?



  • @jay
    In this example, there are 3 radio buttons and each one displays different content. you can make this type of application for the navigation menus...etc

    HiseSnippet 1002.3ocsW97aaaCEGmxNJHVataEnHmExIGfr.ao1tATLzz3zTXrkTi4thcqfQhNhHRjBRTo0nn.63t0+c5o1ArKE67Ntq63.1+AYOJpeXmpnHs1IeQ7w2W99nmIe5ooQbGRbLOBo06IKBIHsOWe1BlvarGlxPSN.ocC8ivwBRjoxz9KBwwwDWjlV2GIMn0aMT50+b+8w9XlCozDB8TN0g78z.pnz5z89Npu+gXWxSnAK48s2ahCmMl6yS.d5pODEhcNCeJ4XrzsN5HM8G5RE7nYBrfDizVaet6hYd7myT9+TZL8DehbvHzLXgTlOj66JIVZEM1i56NM+4NFAqxzxrPWUV3V5GQcoE1KyFeY5DlkJVNen0oN7Fc83MrJ7zVBu0T3cS8YNQzPQ4LR19L8IL3Op4X3ufkwR4KpyezUeLG7fI1M.eF4vHXPghA2c3vcLuyvgaeu9F8Mf+HhElmiiLCwLh+Hyu0LW6oDwXdPHmACFrkZ5sjptjFq50XUkF650XCZLVgNOpKQlguZ.K73RwK2t00pz5JTZesJs2RkMk+nLeJiXNOg4HnblImUPlbQh39CXIAmPh1ABheBY69FurugY1kJMuaL3dt2JutmYeiWIW+hUa2XIKo9LF66eBbFZvGFrl.lUSAypIfYUOXVs.L6lBlcS.ytdvrK.aIRNlKHOlMXaiWZzy3UFWdl4yqZprExmDU0rxhgQ0H6ROrY9A0DVsny5MqniiZi6RNxYSXTwiCIYiqupIJamOTfpaFfvchzxS2Hq7z9IBAmgntxZSEa.Qo7C0x0Rq52JwVeLhsyEW9FKzON4.r.Kqxl87.OigjHAUlJ0NfbN75KUM2d5GPhOSvCgTbwQc39F8H+hbhWjeif7BQpLXdyox8pliPQXWJ+QQ7jv7zd6BjkLPku7cQwfed7dUDPqO5.ZeUA7WmUU.sqMf8TAre9K2jRRi2F5pxepz36ySi2Bt44TWgGHc8cTaHPdD5odxEa82mAEUPBxapn25u9Mu8hUsZsr4yyOsn0sMnY8o.seYy+pJzd2W720g1FWCZ1eJPayeuRz1729yKTsz8Asn.MJwcS7whU6dR1xX1DPwsUZSQ1JBKlJVr7AzVzR0vF2wWSw8l5SoBGup4sSE7B0Q9+l2rFT6q+v4yINhRXWS+ve5+Z2ns.kefmHnrSOBKhnxMVGmDLC1N3P.RXv1sX4drNxRypwCyK3MivbSGbAbkM4H4XsrIGkOIJ.6Dwelip1trE3MRs.LwR+Rfdvmj.iMKdUhj6.nu7m43HSDeEPd0JrZsB6Vq31sVwcZsh61ZEecqU7M0nP9QPOHQvCTGKPn+E0W.ep
    

    Code:

    Content.makeFrontInterface(600, 500);
    
    const var panel1 = Content.getComponent("panel1");
    const var panel2 = Content.getComponent("panel2");
    const var panel3 = Content.getComponent("panel3");
    
    
    const var hideShow1 = Content.getComponent("hideShow1");
    const var hideShow2 = Content.getComponent("hideShow2");
    const var hideShow3 = Content.getComponent("hideShow3");
    
    
    
    inline function onhideShow1Control(number, value)
    {
            panel1.showControl(value); 
    }
    
    hideShow1.setControlCallback(onhideShow1Control);
    
    
    
    inline function onhideShow2Control(number, value)
    {
            panel2.showControl(value); 
    }
    
    hideShow2.setControlCallback(onhideShow2Control);
    
    
    
    inline function onhideShow3Control(number, value)
    {
            panel3.showControl(value); 
    }
    
    hideShow3.setControlCallback(onhideShow3Control);
    

Log in to reply
 

1
Online

470
Users

1.6k
Topics

11.8k
Posts