1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    34
    Vote Rating
    0
    Bassem Samy is on a distinguished road

      0  

    Default Answered: scroll a panel horizontaly

    Answered: scroll a panel horizontaly


    Hi
    i have a panel
    var scrollItem = Ext.create("Ext.Panel", {
    height:74,width:230,scrollable:{direction:'horizontal',directionLock:true},
    html:GetScrollItemHtml()
    });
    is there a way to use ,scrollItem.scrollTo(0,30px) ?
    in docs there is scrollTo in Ext.Scroll.Scroller,
    but container.getScrollable() but it returns scroll.view which has scroll to
    so i want to scroll my panel automatically , any help ? thx

  2. You have to access Ext.scroll.Scroller and use the scrollTo method from there

    e.g.
    Code:
    var scroller = panel.getScrollable().getScroller();
    scroller.scrollTo(200, null, true);

  3. #2
    Sencha User grgur's Avatar
    Join Date
    Aug 2007
    Location
    Split, Croatia
    Posts
    155
    Vote Rating
    24
    Answers
    10
    grgur has a spectacular aura about grgur has a spectacular aura about

      1  

    Default


    You have to access Ext.scroll.Scroller and use the scrollTo method from there

    e.g.
    Code:
    var scroller = panel.getScrollable().getScroller();
    scroller.scrollTo(200, null, true);
    Grgur Grisogono
    Ext JS in Action SE co-author
    Exercising awesomeness at Modus Create - Official Sencha Partner

    Get in touch for Sencha Touch Training
    @ggrgur

  4. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    34
    Vote Rating
    0
    Bassem Samy is on a distinguished road

      0  

    Default


    thanks thanks it did work

Thread Participants: 1

Tags for this Thread