How about something like this (not tested) in a DeferredCommand:
Element root = RootPanel.get().getElement();
int offsetHeight = DOM.getElementPropertyInt(root, "offsetHeight")
int clientHeight = Window.getClientHeight();
if (offsetHeight > clientHeight) {
DOM.sestElementPropertyInt(root, "scrollTop", (offsetHeight -
clientHeight + 40)
}
Walden
On Aug 24, 12:00 pm, Paul van Hoven <[EMAIL PROTECTED]>
wrote:
> On my webapp when the user clicks a certain link the page loads
> another widget (significantly larger than the size of the physical
> screen). The problem: the interesting part for the user is on the
> bottom of the page. Hence I would like to make something like this:
>
> RootPanel().get().setScrolling( toTheBottomOfThePage )
>
> Since I didn't find anything like that I tired the
> "DOM.scrollIntoView(Element elem)"-method by
>
> DOM.scrollIntoView( myWidget.getElement() );
>
> But it doesn't work. Then I tried ScrollPanel but it doesn't seem
> apropriate for my case.
> How can I tell my GWT app to scroll down to the bottom of the page?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---