HISE Logo Forum
    • Categories
    • Register
    • Login

    Change sliderpack - keep same size

    Scheduled Pinned Locked Moved General Questions
    4 Posts 2 Posters 156 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.
    • B
      BWSounds
      last edited by

      Hello,
      Is it possible to change the amount of slides on a sliderpack and the width of the sliders stays the same?

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @BWSounds
        last edited by

        @BWSounds The width of the sliders is based on the width of the sliderpack, so as you change the number of sliders you need to adjust the sliderpack's width.

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

        1 Reply Last reply Reply Quote 0
        • B
          BWSounds
          last edited by

          Would I do somethink like this?

          //

          inline function onSizebuttonControl(component, value)
          {
          if(value)

          if (Sliderpack.get("width") == 517)
          {
             Sliderpack.set("width", 190);
              Sliderpack.set("height", 130);
              Sliderpack.set("x", 455);
             Sliderpack.set("y", 42);
              
          }
          else
          {
              Sliderpack.set("width", 517);
              Sliderpack.set("height", 177);
              Sliderpack.set("x", 70);
            Sliderpack.set("y", 39);
             
          }
          

          };

          Content.getComponent("Sizebutton").setControlCallback(onSizebuttonControl);

          1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey
            last edited by

            Something like that. I don't think you need to change the X, Y, or the height though. And you haven't changed the number of sliders.

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

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

            16

            Online

            1.7k

            Users

            11.8k

            Topics

            102.4k

            Posts