new ClickHandler() {
public void onClick( ClickEvent event ) {
int tableTop = secondFlexTable.getAbsoluteTop();
scrollPanel.setScrollPosition( tableTop );
}
}
i suppose in your case it wouldn't be a click handler if you're basing
it off the history token, but hopefully this will point you in the
right direction.
On 12 апр, 19:12, "t.dave" <da...@lorgeousdays.com> wrote:
To scroll to a Button for example:
Button button = new Button();
//...
button.getElement().scrollIntoView();
This will scroll any required elements (including ScrollPanels and the
document itself) to make sure that the Button is visible to the user.
Hope that helps.
//Jason
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
looks like there are some easier ways of doing things than how i'm
doing my scrolling, and this would probably be not the easiest, but
i'll mention it for completeness. it's also possible to do the
browser window scrolling in javascript, and make a JSNI call to the
javascript function to do it. i'm currently using this method to
simulate a page refresh:
function scrollToTop() {
window.scroll( 0, 0 );
}
and the corresponding GWT JSNI method:
public native void jsScrollWindowToTop() /*-{
$wnd.scrollToTop();
}-*/;
just one more option.
> > google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsu...@googlegroups.com>