1. #1
    Sencha User
    Join Date
    Dec 2012
    Posts
    3
    Vote Rating
    0
    sbalbalosa is on a distinguished road

      0  

    Default Unanswered: How to scroll by default to a specific item of Ext.List in Sencha Touch 2.1

    Unanswered: How to scroll by default to a specific item of Ext.List in Sencha Touch 2.1


    Hi,

    I want to scroll to top of a specific item in a list when it first load, what I did in 2.0 is to sum the height of all the items on top of that specific item I want to scroll to and get the scroller of the list and set the default scroll of it using scrollBy method that has a parameter of Y axis in which I have passed the accumulated height. Now in 2.1 the list implementation is changed I can't sum the height of the items because the dom is resused and there is only a fix number of item that I can hold on unlike before that the whole list is rendered. Is there a any suggested way to do this maybe some type of cursor in the store so the list knows where to scroll by default?

    Thanks
    Sharlon

  2. #2
    Sencha Premium Member
    Join Date
    Sep 2012
    Location
    The Netherlands
    Posts
    41
    Vote Rating
    2
    Answers
    3
    zwikske is on a distinguished road

      0  

    Default


    Perhaps you could try to use setActiveItem(item)? That should set an item in the list active, though I'm not sure if it will scroll to it as well.