Results 1 to 4 of 4

Thread: Custom Scrollbar using Flexcroll

  1. #1
    Ext User
    Join Date
    Nov 2009
    Posts
    5
    Vote Rating
    0
      0  

    Post 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

    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
      }
    });
    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.

    Here's the screenshot:


    customscroll.JPG

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    118
      0  

    Default

    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.

  3. #3
    Ext User
    Join Date
    Nov 2009
    Posts
    5
    Vote Rating
    0
      0  

    Default

    My bad. Thanks Condor. I'll try it.

  4. #4
    Sencha Premium Member
    Join Date
    May 2010
    Posts
    21
    Vote Rating
    0
      0  

    Default 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

  1. Replies: 25
    Last Post: 28 Jan 2011, 4:05 PM
  2. Custom scroll amount for scrollbar in grid
    By s1m55r in forum Ext GWT: Discussion
    Replies: 0
    Last Post: 16 Apr 2010, 1:00 AM
  3. Custom ScrollBar
    By mcohnen in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 5 Nov 2007, 1:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •