HISE Logo Forum
    • Categories
    • Register
    • Login

    RadioGroup Default

    Scheduled Pinned Locked Moved Scripting
    3 Posts 3 Posters 733 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.
    • d.healeyD
      d.healey
      last edited by

      What would be the best way to have a button in a radio group be active when the script is loaded? Currently if a button is not part of radioGroup it will remember its state each time the script loads but those that are part of a radioGroup default to off rather than recalling their previous state.

      <?xml version="1.0" encoding="UTF-8"?>
      
      <Processor Type="ScriptProcessor" ID="radioGroupTest" Bypassed="0" Script="const var button1 = Content.addButton(&quot;button1&quot;, 0, 0);&#13;&#10;button1.set(&quot;radioGroup&quot;, 1);&#13;&#10;&#13;&#10;const var button2 = Content.addButton(&quot;button2&quot;, 150, 0);&#13;&#10;button2.set(&quot;radioGroup&quot;, 1);&#13;&#10;&#13;&#10;const var button3 = Content.addButton(&quot;button3&quot;, 300, 0);&#13;&#10;button3.set(&quot;radioGroup&quot;, 1);&#13;&#10;&#13;&#10;button1.setValue(1);function onNoteOn()&#10;{&#10;&#9;&#10;}&#10;function onNoteOff()&#10;{&#10;&#9;&#10;}&#10;function onController()&#10;{&#10;&#9;&#10;}&#10;function onTimer()&#10;{&#10;&#9;&#10;}&#10;function onControl(number, value)&#10;{&#10;&#9;&#10;}&#10;">
        <EditorStates BodyShown="1" Visible="1" Solo="0" contentShown="1" onInitOpen="1"
                      onNoteOnOpen="0" onNoteOffOpen="0" onControllerOpen="0" onTimerOpen="0"
                      onControlOpen="0"/>
        <ChildProcessors/>
        <Content>
          <Control type="ScriptButton" id="button1" value="0"/>
          <Control type="ScriptButton" id="button2" value="0"/>
          <Control type="ScriptButton" id="button3" value="0"/>
        </Content>
      </Processor>
      

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

      1 Reply Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart
        last edited by

        Yes, that's strange. I'll check it out.

        J 1 Reply Last reply Reply Quote 3
        • J
          jeffd @Christoph Hart
          last edited by

          @Christoph-Hart

          did anyone ever figure this out? My buttons default to off.

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

          44

          Online

          1.7k

          Users

          11.7k

          Topics

          101.9k

          Posts