Hybrid View
-
19 Oct 2011 3:20 AM #1
Answered: Making scrollbar visible all the time
Answered: Making scrollbar visible all the time
Hi,
I wonder if there's a way to make the scrollbar of a list/panel visible all the time? I mean that the scrollbar should not only be visible when I touch the panel.
Any ideas?
-
Best Answer Posted by AndreaCammarata
You are welcome gulsan

I personally don't like your choose to show you the scrollbars all the time, but if you want do that, and you want to show them from the beginning, you can do that like follow:
Hope this helpsCode: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 viewport = new Ext.Panel({ fullscreen: true, scroll: 'vertical', html: 'My Panel', listeners: { afterRender: function(pnl){ //Getting the ScrollView var sw = pnl.scroller.scrollView; //Updating the vertical scrollbar size sw.indicators.vertical.setSize(pnl.getHeight()); //Show the indicators sw.showIndicators(); } } }); } });
-
19 Oct 2011 4:33 AM #2
Hi gulsan,
Take a look at this thread.
http://www.sencha.com/forum/showthre...ow-permanently
Hope this helps.Sencha Inc
Andrea Cammarata, Solutions Engineer
CEO at SIMACS
@AndreaCammarata
www.andreacammarata.com
github: https://github.com/AndreaCammarata
-
19 Oct 2011 5:51 AM #3
Thank you for your quick answer andreacammarata =)
But there's still one thing that bothers me. With the code you provided I have still to touch the panel for once. So is it also possible to show the indicators even without touching the panel for once? Say as soon as I get to see the panel I want to see the scroll indicators as well.
-
19 Oct 2011 7:49 AM #4
You are welcome gulsan

I personally don't like your choose to show you the scrollbars all the time, but if you want do that, and you want to show them from the beginning, you can do that like follow:
Hope this helpsCode: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 viewport = new Ext.Panel({ fullscreen: true, scroll: 'vertical', html: 'My Panel', listeners: { afterRender: function(pnl){ //Getting the ScrollView var sw = pnl.scroller.scrollView; //Updating the vertical scrollbar size sw.indicators.vertical.setSize(pnl.getHeight()); //Show the indicators sw.showIndicators(); } } }); } });
Sencha Inc
Andrea Cammarata, Solutions Engineer
CEO at SIMACS
@AndreaCammarata
www.andreacammarata.com
github: https://github.com/AndreaCammarata
-
20 Oct 2011 7:20 AM #5
Thanks a lot, it really does work

-
20 Oct 2011 7:22 AM #6Sencha Inc
Andrea Cammarata, Solutions Engineer
CEO at SIMACS
@AndreaCammarata
www.andreacammarata.com
github: https://github.com/AndreaCammarata


Reply With Quote