I assume you're using GWT 2.0. If so dom.client.Element has a method: 
"scrollIntoView" which may be what you are looking for.

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

On Tuesday, 13 April 2010 10:35:21 mram wrote:
> I don't understand well your question, but why don't you use div to
> separate parts from the page, and then call the div class that you
> need??
> 
> On 13 abr, 08:55, redlaber <vyalov.e...@gmail.com> wrote:
> > The next problem: I have finished big gwt-application and I cant add a
> > ScrollPanel in it. But i know position of browser scrollbar, where I
> > want to jump (scroll). Is there no way to simply scroll through the
> > document to a given position?
> >
> > On 12 апр, 19:12, "t.dave" <da...@lorgeousdays.com> wrote:
> > > use ScrollPanel.setScrollPosition().  that sets the vertical scroll
> > > position of the scrollpanel, which you will need to calculate.  try
> > > something like this:
> > >
> > > 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 Apr 12, 7:34 am, redlaber <vyalov.e...@gmail.com> wrote:
> > > > I want to scroll page, generated with gwt, to some element. Its
> > > > should be simple, but i cannt find the solution. For example: I have
> > > > a vertical panel with two flexables. When i get the history token
> > > > "goto2" I want to scroll my page to the second table. (Sorry for the
> > > > terrible english).
> 

-- 
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-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to