Results 1 to 4 of 4

Thread: Slider.setValue not initializing in the correct position?

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    May 2011
    Posts
    5
    Vote Rating
    0
      0  

    Question Slider.setValue not initializing in the correct position?

    I'm trying to initialize a slider at 50, in a 0 to 100 range,

    if I set the config value to 50, the value is preserved but the thumb keeps in 0, and if I try to changed by:

    slider.setValue(50);

    I'm getting:
    TypeError: Result of expression 'thumb.dragObj' [undefined] is not an object.


    Funny that the slider moves without problems if I change the value using firebug console.


    slider = new Ext.form.Slider({
    cls:'slider',

    value: 50,
    minValue: 0,
    maxValue: 100,
    width:325,
    height:65,
    maxWidth:200,
    ui:'dark',
    listeners:{
    change :{
    fn: function(container,thumb, new_val, old_val){
    //todo
    }
    }
    }

    });

  2. #2
    Sencha Premium Member
    Join Date
    Mar 2008
    Posts
    60
    Vote Rating
    5
      0  

    Default

    What type of container does your slider have ?

    I got stuck with this kind of error when I tried to have a slider inside a Toolbar,
    Forcing an Ext.Panel as a Container of the slider did the trick

    You may check :
    http://www.sencha.com/forum/showthre...ighlight=thumb
    or
    http://www.sencha.com/forum/showthre...ghlight=slider

  3. #3
    Sencha User
    Join Date
    May 2011
    Posts
    5
    Vote Rating
    0
      0  

    Default

    Thanks!!!
    I was really lost debugging this one, I fixed using your recommendation on the other post:

    """sliderElementReference.getThumb().dragObj.updateBoundary();"""


    How did you find out it was a boundaries issue?

  4. #4
    Sencha User
    Join Date
    Mar 2008
    Posts
    129
    Vote Rating
    1
      0  

    Default

    Searching the forum for "dragObj"
    (This was not a post of mine)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •