By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,028 Members | 1,314 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,028 IT Pros & Developers. It's quick & easy.

Horizontal scrol bar max value problem.

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.