Change sliderpack - keep same size



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



  • @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.



  • 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);



  • 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.


Log in to reply
 

10
Online

1.0k
Users

3.6k
Topics

30.7k
Posts