Horizontal scrol bar max value problem.

  • Thread starter Thread starter Doug Carter
  • Start date Start date
D

Doug Carter

I'm using a horizontal scroll bar control to represent teh default values of
MIn 0 to Max 100. I assign the current value of the horizontal control to a
label control.Text string but when the horizontal scroll bar reaches the max
limit the value indicated is only 91? Changing the big step value to 1
solves the issue but I want to be able to take big steps without writing
side effect code to do so. Any suggestions?
 
Hi Doug,

It's a common misconception that a scrollbar should take the values 0 to
100 when the width of the 'space' that it scrolls is 100. Programmers who do
this are responsible for all the times that you scroll to the end of a
document and find yourself looking at a single line and a page of blank space,
or a single character column on the left and the rest blank. Those who
additionally get their -/+1's wrong will give you a completely blank space to
look at. Most annoying!! :-(

So what am I talking about?

A horizontal scrollbar should be given the range that the <left hand side>
will take. Not the range of the entire space. This is so that when the user
scrolls as far as possible to the right, the scrollbar value <plus> the width
of the viewing area will give the maximum value at the <right hand side>.

So, I think I'm glad that your maximum value is 91. Because this means
that your view will fit what it's showing without leaving huge areas of white
space.

Or are you using the scrollbars for something different, I wonder? That
mention of Big Step has me puzzled. Can you tell us more ?

Regards,
Fergus
 
Hello,

Doug Carter said:
I'm using a horizontal scroll bar control to represent
teh default values of MIn 0 to Max 100. I assign the
current value of the horizontal control to a label control.
Text string but when the horizontal scroll bar reaches
the max limit the value indicated is only 91? Changing
the big step value to 1 solves the issue but I want to
be able to take big steps without writing side effect
code to do so.

This is by design.

http://groups.google.de/groups?selm=6RCLIKLTCHA.2096@cpmsftngxa08
 
Back
Top