vScrollBar

D

Dmitri Shvetsov

Hi All,

Did somebody play with vScrollBar in C#? I've got a small trouble. When I
assign the Maximum value and try to move the slider of the vScrollBar to a
maximum position I can't get the maximum value from a vScrollBar.Value. I
can assume that to correct this problem is easy. I'm sure that's it's a bug,
the developers didn't think about the width of the slider and this width is
excluded from the vScrollBar total length, so we're losing a few values at
the very end. I don't like to use any other component to set the required
values, this visual component is looking good, but this bug... I could try
to increase the Maximum value to allow the slider to return the maximum
value but it's not very good and useful, because it's impossible to predict
the correct maximum value.

Any suggestions?

Dmitri
 
R

Rob Teixeira [MVP]

It's not a bug - just the way it works. This is from the help file:
"Note The value of a scroll bar cannot reach its maximum value through
user interaction at run time. The maximum value that can be reached is equal
to the Maximum property value minus the LargeChange property value plus one.
The maximum value can only be reached programmatically."

The idea is that the largechange represents a "page". Every time you perform
a "large change", you scroll down one page at a time. The max value a user
can click is the "top" of the last "page". Read the rest of the help file on
the Maximum property to see how large change, small change, and maximum
relate to eachother.

-Rob Teixeira [MVP]
 

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