1. #1
    Sencha User
    Join Date
    Sep 2011
    Location
    Boston
    Posts
    138
    Answers
    5
    Vote Rating
    6
    drb is on a distinguished road

      0  

    Default Unanswered: How do I find the scroller for a specific component?

    Unanswered: How do I find the scroller for a specific component?


    I have components on a Panel which has scroller.

    Sometimes the components are inside a FieldSet.

    Is there a simple way to find the scroller or do I have to crawl my way up the parents until I find something with a Scroller?

    Thanks
    David

  2. #2
    Sencha User jerome76's Avatar
    Join Date
    Apr 2012
    Location
    New Jersey
    Posts
    1,149
    Answers
    132
    Vote Rating
    99
    jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice

      0  

    Default


    Do you create this Scroller (Ext.scroll.Scroller) manually or are you using the scrollable config for the Panel?

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Location
    Boston
    Posts
    138
    Answers
    5
    Vote Rating
    6
    drb is on a distinguished road

      0  

    Default


    I'm using scrollable in the Panel config. The difficulty is that all I have to start with is the component.

    I ended up writing a routine to crawl up the parents which seems to work:
    Code:
            scrollIntoView: function (ctl) {
                var parent = ctl;
                var scrollable = null;
                // Find the scroller (if any).
                while (true) {
                    if (!parent.hasParent()) {
                        return;
                    }
                    parent = parent.parent;
                    if (!parent.isContainer) {
                        continue;
                    }
                    scrollable = parent.getScrollable();
                    // If the parent is a container and it is scrollable, we found it!
                    if (scrollable) {
                        break;
                    }
                }
                var scroller = scrollable.getScroller();
                ...
            }

  4. #4
    Sencha User jerome76's Avatar
    Join Date
    Apr 2012
    Location
    New Jersey
    Posts
    1,149
    Answers
    132
    Vote Rating
    99
    jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice

      0  

    Default


    You should be able to use the .up('...') or .down('...') when you reference the component which basically runs up or down the list of components in use. I think you can search for the scroller that way. Read up on those functions from the docs. I would link it but it is taking too long to access them from my iPad right now.

Thread Participants: 1

Tags for this Thread

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..."