Sunday, January 10, 2016

Scrolling to Elements/Widgets in Some Container

Hi all,

Let's say that I have a VerticalPanel that contains some Composite widgets.  
I place this VerticalPanel inside a Scroll Panel.

Now, I would like to be able to click a link in one of the Composites, and have the ScrollPanel scroll its contents to another Composite widget in the same VerticalPanel.

When I tried use Anchor widgets with their id attributes set (named anchors are not supported in HTML 5) and I set the href attributes of the corresponsing clickable Anchors to href="#...", the whole view scrolls incorrectly.

  • Is there any way to achieve the effect of ordinary named anchors and anchor links in GWT using widgets?
  • Can element.scrollIntoView() be used somehow? How to limit the scope to just the scroll panel and not the whole view?

Thanks!

- JM

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment