Using Scrollbars

Excuse my diagram but it may help my query.

Scenario: Suppose my window is 800 pixels high as shown, my content is 1300 high and therefore 500 off screen as shown.

I have currently set my scrollbar MIN as 0 and MAX as 500. As I scroll the content is shifted by the number of pixels I have scrolled. This works fine but using large numbers in the scroll bar max makes the scroll drag portion of the bar very small.

What is a better approach for this?

(Ha Ha - sounds like an exam question)

That’s fine. Just use a bigger .linestep. Maybe 20? Set the .pagestep to the height of the window.

Beautiful, thanks Brad, thats done the trick

Page step is also very important. In your case, the value should be 800. It is the height of the viewport.

Thanks Thom. How does a user step down a page (on Mac). Also if i invoke a page step, I assume my scrollbar value will not go over its max value, i.e. in my diagram above a page step of 800 would give me 1600, will the scrollbar be limited to its Max?

Page down works. There is a system preference the user can choose to toggle between “jump to here” and “jump to next page” when clicking on the track. And no, page stepping will never go over the maximum. And I don’t believe you can invoke a page step in code, aside from doing Scrollbar.Value = Scrollbar.Value + Scrollbar.PageStep.

Thanks all. Fully working now.