What do YOU get?

L

Larry Serflaten

I'm using VS 2003 on W2K SP4

When I set a VScrollBar maximum value to 51, and the LargeChange
value to 13, the scroll bar only goes up to 39.

To get to 51 I have to set the Maximum value to 63.

Is that what everybody gets, and why?

With a VScrollBar on a new form and the Maximum and LargeChange
properties set as above, this is the only code I added:

Private Sub VScrollBar1_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles VScrollBar1.ValueChanged

Debug.WriteLine(VScrollBar1.Value)

End Sub

Is that a known bug?

LFS
 
A

Armin Zingler

Larry Serflaten said:
I'm using VS 2003 on W2K SP4

When I set a VScrollBar maximum value to 51, and the LargeChange
value to 13, the scroll bar only goes up to 39.

To get to 51 I have to set the Maximum value to 63.

Is that what everybody gets, and why?

Yes, and I don't know why. Well, I do know, but I don't "like" it: Imagine
you've got a Textbox containing 63 lines. Also assume that the Textbox'
height is 13 lines. The maximum value for the vertical scrollbar is 39 to
see all lines. You see?
I don't like it because we are forced to set the LargeChange value equal to
the height of the textbox even if we want to make smaller steps by setting
the LargeChange property to smaller values. It might be good for the Textbox
where you always want to scroll 1 page at a time, but sometimes or in other
cases we should be able to scroll by 1/2 page or any value we want. In order
to do this, I set the Maximum property to a higher value - leading to more
confusion, IMO.

AFAIR this behavior is described anywhere in the docs, but I don't find it
now...

--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 
L

Larry Serflaten

Armin Zingler said:
Yes, and I don't know why. Well, I do know, but I don't "like" it:

No kidding! They should have had some 'Intergral' flag to request
that mode of operation. It is as if they are saying we can only use
the scrollbars for just one purpose. That certainly was not very
imaginative of them. Thanks for replying, at least I know I can
expect these same (predicable) results on other people's machines....

LFS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top