Scrolling between states in dynamic panel

I need to maintain the scroll position between States in a dynamic panel. I have set the dynamic panel to “vertical scroll”. so when clicking from state1 to state2 the scroll position is not maintained. how do I fix this. I’ve read other forums about this and in my case I won’t know where the user has scrolled to so an anchor will not work.

You can track the amount of scroll by the position of a widget or better yet all the contents in a dynamic panel state. I would recommend grouping all the widgets in each state and naming these groups so they are easily associated with their panel state. In the Moved event of each group set the value of a global variable or the text of a hidden widget to the group’s y-position. In the State Changed event (or just prior to calling Change State) move that state’s content group to the variable value to restore the last scroll position.

Hope this makes sense. If not, post your .rp file and I can demonstrate this solution.

Hi mbc66, thank you for responding! I am not at the level yet to do the whole variable piece. But I did solve it mostly. I did what you suggested by making the two states into groups and placed in the same state. then I had my link/buttons show and hide the groups accordingly. So far I think this will work well enough for the testing I’m preparing for. Thanks again!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.