472,126 Members | 1,469 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,126 software developers and data experts.

Horizontal scrol bar max value problem.

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?
Nov 20 '05 #1
2 3731
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

Nov 20 '05 #2
Hello,

"Doug Carter" <do********@houston.rr.com> schrieb:
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=...40cpmsftngxa08

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Bernd Kuegle | last post: by
2 posts views Thread by Eduard | last post: by
9 posts views Thread by Verona Busch | last post: by
3 posts views Thread by Taras_96 | last post: by
9 posts views Thread by patrick j | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.