Results 1 to 7 of 7

Thread: Problem with hiding vertical scrollbar on scrollable grid

  1. #1
    Sencha User
    Join Date
    Nov 2016
    Posts
    21
    Answers
    1

    Default Answered: Problem with hiding vertical scrollbar on scrollable grid

    In the below fiddle, I have a grid that the user can scroll vertically using their mouse wheel. I have used the "scrollbars: false" config setting on the Scroller object to hide the vertical scrollbar. How do I get rid of the space that is left behind by that scrollbar?



    Thanks

  2. Here's a thread with a solution that might work for you:
    https://www.sencha.com/forum/showthread.php?292720

  3. #2
    Sencha User
    Join Date
    Nov 2016
    Posts
    21
    Answers
    1

    Default

    Anybody got any ideas? Do you think this is a bug?

  4. #3
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    I don't think it's a bug since the scrollbars config on Scroller is private. So you want scrollability but no visible scrollbars?

  5. #4
    Sencha User
    Join Date
    Nov 2016
    Posts
    21
    Answers
    1

    Default

    Hi Gary,

    Yes, I would like scrollability but no visible scrollbars. I have another grid beside this one which has its scrollbar visible. When either grid is scrolled, the other one is kept in sync. Just need to get rid of that space.

    Cheers

  6. #5
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    Here's a thread with a solution that might work for you:
    https://www.sencha.com/forum/showthread.php?292720

  7. #6
    Sencha User
    Join Date
    Nov 2016
    Posts
    21
    Answers
    1

    Default

    Gary, thanks very much. I figured out a solution from that thread.

    For anyone else interested, I set "scrollable" to false and then added the below "afterrender" listener to my grid.

    Code:
            listeners: {
                afterrender: function (me) {
                    var viewEl = me.getView().getEl();
                    
                    viewEl.on('mousewheel', function (e) {
                        viewEl.setScrollTop(viewEl.getScrollTop() + e.browserEvent.deltaY);
                    });
                }
            }
    I have updated my fiddle with these changes.

    Cheers

  8. #7
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    Glad to hear it, and thanks for sharing your solution with the community!

Similar Threads

  1. Replies: 1
    Last Post: 11 Apr 2016, 3:40 PM
  2. Problem vertical scrollbar grid gxt 3.1.1
    By baczek00 in forum Sencha GXT 3.1
    Replies: 1
    Last Post: 30 Sep 2014, 1:04 PM
  3. Problem in TreeTable Vertical Scrollbar
    By livinglegends in forum Ext GWT: Discussion
    Replies: 0
    Last Post: 15 Jun 2009, 5:37 AM
  4. Hiding vertical scrollbar after refreshing the EditorGridPanel
    By Jayabharathi in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 15 Jan 2009, 5:15 AM

Tags for this Thread

Posting Permissions

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