Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET Vertical Scrollbar not Respecting Maximum Property

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)

like image 688
Kevin Laity Avatar asked May 21 '10 14:05

Kevin Laity


2 Answers

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.

like image 186
Kevin Laity Avatar answered Nov 15 '22 16:11

Kevin Laity


The default value of LargeChange property is 10. This value is used when scrollbar is incremented by clicking the right arrow. If you want to show all values (assuming 1,2,3,4,...) with mouse clicks, set LargeChange = 1

like image 35
Syed Irfan Ahmad Avatar answered Nov 15 '22 16:11

Syed Irfan Ahmad