Displaying panels on panel scroll (infinite canvas), with pinned dates and time axes

Hi!

This will be fairly complicated code!

To scroll the the far right upon arriving to each panel, as you would want to do while going to the previous panel state, you’d want the following in each state of the panel:

  • A rectangle called scrollToMe1, say 10x10 pixels, set at y=0. (Set its opacity to 0 once everything is working: that will make debugging easier.)
  • A rectangle named rightEdge1, which is at the far right side of your panel state

Note the number at the end indicates which state the widgets are in, so you’d also have a rightEdge2, etc.

You’d also need some kind of variable that says whether you are going to the previous state or not.

  On Panel State Changed
    If state of This is state1 AND v_goingToPreviousState equals true
      move scrollToMe1 to x: 0  y: [[LVAR_rightEdge.right - LVAR_gridwindow.width]]
      scroll to widget scrollToMe1 horizontally

… where LVAR_rightEdge is a local variable referring to rightEdge1, and LVAR_gridwindow is a local variable referring to your outer dynamic panel. You might want add a minus 1 to the the expression in brackets, so you don’t automatically trigger your code that causes the next panel to show. You would need a condition like this for each state (except the last one, of course).

For fixed headers and left columns, you can follow this example.

[Edit] I have x and y reversed in the code above: change it to:

move scrollToMe1 to x: [[LVAR_rightEdge.right - LVAR_gridwindow.width]]  y:0