Results 1 to 3 of 3
  1.    #1  
    I've set up a slider widget but I just don't seem to be able to get it central.

    For some reason it's aligned to the right with a large gap on the left.

    Here's my code:

    Code:
    VIEW:

    <div id="listGroup" class="palm-group" style="height:30px">
    <div class="palm-group-title" style="text-align:Left;">Select Speed</div>
    <div x-mojo-element="Slider" id="speed" class="palm-slider" name="speed" style="width:100px"></div>
    </div>

    ASSITANT:

    this.controller.setupWidget("speed",
    this.attributes = {
    minValue: 0,
    maxValue: 20,
    round: true
    },
    this.model = {
    value: intFastest,
    disabled: false
    });
    this.controller.listen("speed",Mojo.Event.propertyChange,this.setSpeedSlider.bindAsEventListener(thi s))



    Cheers
  2. #2  
    are you trying to get the entire slider aligned-center or the dot on the slider to start in the center?

    moving the whole slider is as easy as styling it with css. if your app is only in portrait, then it's simple. screen is 320px wide - 100px slider = 220px / 2 = 110px on each side. change:

    style="width:100px"

    to

    style="width:100px;margin-left:110px"
  3. Tibfib's Avatar
    Posts
    345 Posts
    Global Posts
    347 Global Posts
    #3  
    What is "intFastest"?

    Replace it with 10 and the slider will start in the middle.

Posting Permissions