neha.chowdary
24 Nov 2011, 1:55 AM
Hi i am quite new to using gwt ext and having a tough time adding a scrolllistner to a layout container.
what i want to do is get the scroll positions on the scrollevent and use them for further calculations.
But i am not even able to get it triggered.
Here is the dummy code:
public class Workflow extends LayoutContainer implements Entrypoint {
.................
.........
.......
public void onRender(........
.........
setLayout(new FitLayout())
this.setScrollMode(Scroll.Auto);
this.addScrollListener(new ScrollListener () { @Override
public void widgetScrolled(ComponentEvent ce){
Window.alert("Scrolled");
}
});
}...
ideally this should give an alert box when i scroll ... That does not happen!!
what i want to do is get the scroll positions on the scrollevent and use them for further calculations.
But i am not even able to get it triggered.
Here is the dummy code:
public class Workflow extends LayoutContainer implements Entrypoint {
.................
.........
.......
public void onRender(........
.........
setLayout(new FitLayout())
this.setScrollMode(Scroll.Auto);
this.addScrollListener(new ScrollListener () { @Override
public void widgetScrolled(ComponentEvent ce){
Window.alert("Scrolled");
}
});
}...
ideally this should give an alert box when i scroll ... That does not happen!!