1. #1
    Ext User
    Join Date
    Sep 2008
    Location
    UK
    Posts
    31
    Vote Rating
    0
    pepez is on a distinguished road

      0  

    Question Automatic scrolling for Grid Drag'n Drop?

    Automatic scrolling for Grid Drag'n Drop?


    I have a Grid and I would like it to scroll up/down automatically when the user is dragging an item on its upper/lower end and the grid has enough items for a scrollbar.

    Is this already existing functionality in GXT or any ideas how to get started implementing this?

    Thanks!

  2. #2
    Ext GWT Premium Member
    Join Date
    Sep 2010
    Location
    Odense, Dk
    Posts
    4
    Vote Rating
    0
    marcio.mnz is on a distinguished road

      0  

    Default


    Hi, I know it was a long time ago, but did you get any solution for this issue? I'm with this exact problem right now.
    Thanks

  3. #3
    Sencha User
    Join Date
    May 2011
    Posts
    16
    Vote Rating
    0
    Saeter is on a distinguished road

      0  

    Default


    Scrolling grids is a tricky situation, since the scroll bars are included in a different element than the grid itself is rendered in. Then you also have the issue of determining where the mouseOverPosition is as well.

    I'm going to assume you can deal with the second issue for now, as that's within the com.google.gwt.event.dom.client.MouseMoveEvent.

    I've heard people say that they've had luck with calling <Grid>.getView().getScroller().setScrollLeft(<arg>), or setScrollTop, but those didn't work for me personally when I needed to auto scroll a grid.

    Another option is to extend the GridView class, and make "restoreScroll" a public class, which will allow you to automatically add a little bit onto the scroll.

    Combine that with some pseudo code such as:
    Code:
    int topScrollBound = Grid.AbsoluteTtop() + Grid.getHeight();
    int bottomScrollBound = Grid.AbsoluteTop() + Grid.getHeight() - 10;
    If ( mouse position  > topScrollBound && mousePosition < bottomScrollBound )
         <code for scrolling grid down>

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar