1. #1
    Sencha Premium Member ethraza's Avatar
    Join Date
    Jun 2007
    Location
    Brazil
    Posts
    362
    Vote Rating
    3
    ethraza is on a distinguished road

      0  

    Question Automatic Scrolling Grid

    Automatic Scrolling Grid


    I'm trying to get a Grid to automatic scrool to the end, reload the store and start to scroll again in a loop.

    On reload, the size of the view can change, so I need to know when the scroll reaches the end to reload.

    To scroll, I'm currently thinking in do a grid.view.scroller.scrollTo('t', n+1, true) in a loop. But I don't know how to discovery if I reach the end.

    If I scroll to the end and do a grid.view.scroller.getScroll(), it return an object with left and top. The top is what I need. So... There is a way to get this maximum top value without the need to scroll down to know that value?


    Thanks 4 n help!
    LAMPE (Linux / Apache / MySQL / PHP / ExtJs)

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,499
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Isn't it just a bit of arithmetic?

    scrollHeight is the scrollable height. Subtract the element height from scrollHeight, and you get the value to scrollTo if you want to scroll to the end.

  3. #3
    Sencha Premium Member ethraza's Avatar
    Join Date
    Jun 2007
    Location
    Brazil
    Posts
    362
    Vote Rating
    3
    ethraza is on a distinguished road

      0  

    Default


    If someone else wants that:
    grid.view.mainBody.getHeight() - grid.view.scroller.getHeight() = x.view.scroller.getScroll().top

    Thanks!
    LAMPE (Linux / Apache / MySQL / PHP / ExtJs)

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi