views:

24

answers:

1

I have a form and have dropped a vertical scrollbar on it.

Whatever I set the "Maximum" property to, the scrollbar will only scroll up to that value minus 9.

Why is that?

I'm using C# in Visual Studio 2008. (WinForms)

+1  A: 

After some research, I've found that a scroll bar can only go up to it's maximum minus the size of the scrollbar's slider.

And the size of the slider appears to be equal to (LargeChange - 1).

Doesn't seem very intuitive to me but there you go.

Kevin Laity
You got it right; I was about to say the same thing. The worst thing is that this strange design is completely undocumented.
Thomas
Good point on the documentation. And the -1 is a magic number as far as I'm concerned. Very sloppy on Microsoft's part for such a common control!
Kevin Laity