There is a MousePosition function that will return the current mouse position as an ordered pair. I’m looking for a ScrollPosition function that will return the current scroll position as an ordered pair. Does anyone know if there is one or a workaround? Thank you.
No. But thank you for your response. : ) I’ll clarify…
If you have a notebook with lot of content open you will see a scroll bar on the far right and bottom. I’m looking for a function that will return the current value of of the scroll bars. I’d also like to be able to set the value of the scroll bars with a function call.
In a pane, there is a ScrollPosition option which allows you to set both scroll positions to an ordered pair like {500,600}. However, I don’t see an option for the entire notebook.
There does not seem to be a ScrollPosition option for Notebook. And hunting around in various other places there does not seem to be something that is equivalent. I wonder whether there is a means of using CurrentValue in someway to get at this. But, if not, then this is a very sensible suggestion to pass on to the developers because this is clearly a form of control of the notebook that should be in the system, and should be an option to Notebook.
To clarify, I am moving around a notebook programmatically but then when I am done I would like to come back to where I started at same cell and the same scroll position. That way I don’t have to search up and down the screen. I want it to come back to the exact same position as when I left so the screen is in the exact same position as when I left and my eyes don’t have to move at all.
Though I don’t have a solution to “Exact”, there is an approach to getting back to the same cell that you were at. This is to tag the cell with a unique CellTag and then search for that CellTag using NotebookFind. Once found, you can then do a SelectionMove to Before the Cell or After the Cell. (Also before doing such a move you generally should remove the cell tag just for good housekeeping.) I am fond of tagging… See