Forum

    • Register
    • Login
    • Search
    • Categories

    Change sliderpack - keep same size

    General Questions
    2
    4
    72
    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.healey 1 Reply Last reply Reply Quote 0
      • d.healey
        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.healey
            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

            4
            Online

            1.2k
            Users

            7.1k
            Topics

            64.9k
            Posts