Scroll to a component in a panel

Hi,

I want to display a longer text in a panel and I would like to offer buttons with shortcuts to different parts of the text.
My idea was to split the text into a label per part, add them to a panel and then call the missing method scrollTo(Component) on the panel.
Does someone has an idea how to reach this goal?

Thanks

Daniel

You could implement an extension for Panel to scroll to specific components.

In the connector you could get the component position calling component.getWidget().getElement().getOffsetTop().

After that, set the panel scroll top with panel.getWidget().scrollTop.