S
Steve Barnett
I think I'm going nuts... Put a scroll bar control on a form and in the
form_load method, initialise it as follows:
vScrollBar.Minimum = 0;
vScrollBar.Maximum = 10;
vScrollBar.SmallChange = 1;
vScrollBar.LargeChange = 10;
vScrollBar.Value = 0;
vScrollBar.Visible = true;
In the vScrollBar_ValueChanged event, just display the current value of the
scroll bar. For example:
MessageBox.Show("Value: " + vScrollBar.Value);
When I run this, I expect to be able to click the arrow on the scroll bar to
scroll between 0 and 10. What I actually get is values between 0 and 1; I am
unable to scroll any further. I cannot get a value larger than 1.
Now, if I change the LargeChange value to 1, then everything works again.
Have I missed something fundamental about scroll bars here. I assumed that I
would be able to scroll (by the smallchange amount) from the minimum to the
maximum.
Any ideas? Do I have to intercept the "scroll" event and scroll myself?
Thanks
Steve
form_load method, initialise it as follows:
vScrollBar.Minimum = 0;
vScrollBar.Maximum = 10;
vScrollBar.SmallChange = 1;
vScrollBar.LargeChange = 10;
vScrollBar.Value = 0;
vScrollBar.Visible = true;
In the vScrollBar_ValueChanged event, just display the current value of the
scroll bar. For example:
MessageBox.Show("Value: " + vScrollBar.Value);
When I run this, I expect to be able to click the arrow on the scroll bar to
scroll between 0 and 10. What I actually get is values between 0 and 1; I am
unable to scroll any further. I cannot get a value larger than 1.
Now, if I change the LargeChange value to 1, then everything works again.
Have I missed something fundamental about scroll bars here. I assumed that I
would be able to scroll (by the smallchange amount) from the minimum to the
maximum.
Any ideas? Do I have to intercept the "scroll" event and scroll myself?
Thanks
Steve