Dynamic Panel: Initial scrolling in the middle

newbie-question
rp-9

#1

Hello,
Regarding scrolling in dynamic panels: Is it possible to define another initial 'scrolling-start-point" than the top?

For example i have a list of items in a dynamic panel, so i can scroll through all the items.
What i want to have now is that the scrolling does not start at the top items, but somewhere in the middle of the list so i can see one specific item. And from there i can scroll up and down to the other items.
I have tried different things, but have not found a solution yet. Has anybody ideas if it possible to solve this and if yes - how?

(i have attached an example file with such a item list. The goal would be to start the scrolling in a point where item 5 is visible with the opportunity to scroll up and down to the other items)
example.rp (46.7 KB)


#2

You can use the Scroll to Widget action for this. To make it automatic at page load, assign it to the dynamic panel’s Loaded event. You can copy this to other events, like Shown or Selected to make a kind of “reset” if you need. See updated RP file here.

dp-scroll-example.rp (47.4 KB)


#3

Hi,
Thanks for your answer.

The scrollt to widget Action would scrol the whole Page right? It should just scrollt inside the dynamic panel. For this the scroll to widget doesnt work…


#4

Did you try my example? It scrolls the dynamic panel, because it is assigned to the dynamic panel widget.


#5

Hi :slight_smile:
Yes in your example it works, but in mine it didn’t work at first - i tried it out before and just thought scroll to widget would not work inside a dynamic panel.
But i found the mistake: It does not work because I did this inside a master, but if you put it on the pages directly it works.
Thanks a lot!