-
8 Aug 2010 6:37 PM #1
Custom Scrollbar using Flexcroll
Custom Scrollbar using Flexcroll
Hi,
I've implemented a custom scrollbar integration with flexcroll to Ext components(grid and form).
Basically it started out fine. As what conan says on the previous post on cutom scrollbars, you have to change it after the component is rendered. so i tried out like this
it looks fine at first, but i tried to best forms and grids, sometimes it takes a little bit long to render the grid, to this doesn't work unless you set the delay a little much longer too which is not good. so, can someone help me? or suggest something on how i can do this? any help would be much appreciated. Thanks.Code:Ext.applyIf(Ext.grid.GridPanel.prototype, { listeners :{ beforerender: function() { var myDiv = Ext.query('div[@class="x-grid3-scroller"]'); Ext.each(myDiv, function(div){ var divX = Ext.get(div.id); fleXenv.fleXcrollMain(divX.dom); divX.addClass('flexcroll'); divX.set({id: 'customgridscroll'}); divX.dom.fleXcroll.updateScrollBars(); }); }, delay : 200, scope : this } });
Here's the screenshot:
customscroll.JPG
-
8 Aug 2010 9:49 PM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
1. Do NOT put complex objects (e.g. listeners) in the prototype! Just create a GridPanel with a listener and see what happens...
2. For normal components you should override the onRender or afterRender method.
3. GridPanel is an exception, because you need to wait until the rows are rendered too, so you should override GridView.afterRender.
-
9 Aug 2010 4:16 PM #3
-
10 Feb 2013 9:18 PM #4
Custom Scrollbar using Flexcroll
Custom Scrollbar using Flexcroll
Can you give some example,how to implement it with grid panel and tree panel. I am new in extjs
Similar Threads
-
[STALE-613] Ext.Window generates horizontal scrollbar modal and page has scrollbar
By dirving in forum Ext 3.x: BugsReplies: 25Last Post: 28 Jan 2011, 4:05 PM -
Custom scroll amount for scrollbar in grid
By s1m55r in forum Ext GWT: DiscussionReplies: 0Last Post: 16 Apr 2010, 1:00 AM -
Custom ScrollBar
By mcohnen in forum Ext 1.x: Help & DiscussionReplies: 2Last Post: 5 Nov 2007, 1:56 AM


Reply With Quote