1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    2
    Vote Rating
    0
    mmJoe is on a distinguished road

      0  

    Default Answered: Making List Scroll Idicators show permanently

    Answered: Making List Scroll Idicators show permanently


    Hello...my first post here.

    We have several panels with lists that are a little bit longer and some users that are not used to mobile devices. Is there any possibility to make the scroll indicators sticky so they don´t vanish ?

    The scoll configuraiton of the Panel:

    Code:
        
    scroll : {
            direction : 'vertical',
            useIndicators : 'vertical'
    },
    I tried to change this via css:

    Code:
    .x-scrollbar-dark {
        background-color:transparent;
    }
    .x-list .x-scrollbar-vertical {
        opacity:1!important;
        background-color:#AAAAAA;
        height:50%;
    }
    Which is better in a way that the scrollbars appear instantly, but their correct height ist only calculated on the first "dragstart" event which calls a method in Ext.util.ScrollView - which i can´t seem to reach from the scroller object of my panel.

    How can i show the indicators from the beginning and make them stick to the UI ?

  2. Hey mmJoe.
    I don't like what you want to do, but this is your choose .
    Probably the easier way to do that is override the Ext.util.Scroller.Indicator component to prevent from hiding himself.
    I write you a simple example that show you how to do that and how it works with a simple scrollable panel:

    Code:
    Ext.regApplication('Sample,', {
        
        launch: function() {
            
            Ext.override(Ext.util.Scroller.Indicator, {
                hide: function() {
                    var me = this;
                    if (this.hideTimer) {
                        clearTimeout(this.hideTimer);
                    }
                    return this;
                }
            });
    
            var pnl = new Ext.Panel({
                fullscreen: true,
                scroll: 'vertical',
                html: 'My Panel'
            });
    
        }
        
    });
    Hope this helps.

  3. #2
    Sencha User
    Join Date
    Sep 2011
    Posts
    2
    Vote Rating
    0
    mmJoe is on a distinguished road

      0  

    Default


    No Idea? I was hoping for Animal to shred my self respect in less than 10 seconds - just joking

  4. #3
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,394
    Answers
    148
    Vote Rating
    22
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default


    Hey mmJoe.
    I don't like what you want to do, but this is your choose .
    Probably the easier way to do that is override the Ext.util.Scroller.Indicator component to prevent from hiding himself.
    I write you a simple example that show you how to do that and how it works with a simple scrollable panel:

    Code:
    Ext.regApplication('Sample,', {
        
        launch: function() {
            
            Ext.override(Ext.util.Scroller.Indicator, {
                hide: function() {
                    var me = this;
                    if (this.hideTimer) {
                        clearTimeout(this.hideTimer);
                    }
                    return this;
                }
            });
    
            var pnl = new Ext.Panel({
                fullscreen: true,
                scroll: 'vertical',
                html: 'My Panel'
            });
    
        }
        
    });
    Hope this helps.
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    CEO at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    http://www.tux-components.com/


  5. #4
    Sencha User
    Join Date
    Mar 2012
    Posts
    9
    Vote Rating
    0
    jezter is on a distinguished road

      0  

    Default


    For anyone trying to make the scrollbars permanent on Sencha Touch 2.0, here is the solution that worked for me:

    Code:
    	Ext.override(Ext.scroll.indicator.CssTransform, {hide: function() {return false;},initialize:function(){this.show();}});
    	Ext.override(Ext.scroll.indicator.Default, {hide: function() {return false;},initialize:function(){this.show();}});
    	Ext.override(Ext.scroll.indicator.ScrollPosition, {hide: function() {return false;},initialize:function(){this.show();}});

  6. #5
    Sencha Premium Member
    Join Date
    Jul 2012
    Posts
    95
    Vote Rating
    3
    grizzly21 is on a distinguished road

      0  

    Default Certain instances only

    Certain instances only


    If you don't want permanent scroll indicators in all the components of your app, you can apply it to certain instances by doing one of the following:

    1. with a neat css trick:
    Code:
    #myList .x-scroll-indicator[style] {
        opacity: 0.5 !important;
    }

    Where "myList" is the id of my Exd.dataview.List (it can be any other component).

    2. The above didn't work on the ipad mini for example, so you can also try this (this only does it for the y component):
    Code:
    var indicator =  Ext.getCmp('myList').getScrollable().getIndicators().y;
    
    if ( indicator ) {
        
        // set it to show initially
        indicator.element.setStyle('opacity', 0.5);
        
        // or
        // Ext.get('myList').down('div.x-scroll-indicator').dom.style['opacity'] = 0.5;
        
        // never hide it:
        indicator.hide = function() {
            var me = this;
            if (this.hideTimer) {
                clearTimeout(this.hideTimer);
            }
            return this;
        };
    }

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