HISE Logo Forum
    • Categories
    • Register
    • Login

    Change sliderpack - keep same size

    Scheduled Pinned Locked Moved General Questions
    4 Posts 2 Posters 188 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.

        Free HISE Bootcamp Full Course for beginners.
        YouTube Channel - Public HISE tutorials
        My Patreon - 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.

            Free HISE Bootcamp Full Course for beginners.
            YouTube Channel - Public HISE tutorials
            My Patreon - HISE tutorials

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

            18

            Online

            2.0k

            Users

            12.8k

            Topics

            110.9k

            Posts