Scroll within Dynamic Panel

Hi there,

The challenge I’m encountering is scrolling content that is inside a Dynamic Panel while that content has moved in the negative side of the y axis.

You can see a working example here https://1w2fuo.axshare.com/

Let me know if you know a way to fix this.
Cheers!

Hi @AntonMircea,

Is your idea to scroll to a grey box on a click on another element?

If so, you should use “Scroll to Widget” action:
ScrollTo.rp (46.2 KB)

Today it seems you “Move” grey boxes so it mess the dynamic panel up.

Hope it will help,
Best,

Hi @Pierre.J

I appreciate the suggestion. The aim here is to be able to scroll when elements have moved in the negative space of the y axis.

Cheers!

Why is it necessary to move the content in your dynamic panel rather than scroll it, as @Pierre.J shows in his solution? He is right–moving content will mess up scrolling, and it just doesn’t work to try both with the same dynamic panel.

It is important to realize the y-location of content in a dynamic panel is relative to the dynamic panel, not the page, and that scrolling a dynamic panel does not change the location of its content. In other words, when scrolling, nothing actually gets moved. The same is true for any web page: if a header div (or widget) is located at y=0, and the page is scrolled from top to bottom, that header’s y-location is still y=0. The viewport moves–the virtual window or mask area–but not the panel and not the content.

It looks like in your example, you are moving your content–inner boxes–as well as resizing a background rectangle for some reason? I also notice it was done in RP8, so I recreated it in RP8, which will open and work just the same in RP9. There is a demonstration of “click to move” versus “click to scroll”. I also added a page with a solution that uses only Move actions to mimic scrolling–a kind of drag-to-scroll experience. Pick one of these approaches that works best for you but I advise not to try mixing them. I think the best you might achieve is to always set "Move content to (0,0) in the OnScroll event if you feel you must support both dragging-to-scroll and actual scrolling with a scrollwheel.

Scroll vs Move.rp (104.0 KB)

https://l0zhd4.axshare.com

1 Like