Using Scroll bars
WinXP/VB6. I'm trying to figure out how to make my scroll bars repeatedly click while holding down the mouse button over one. Have been experimenting with mouse-move, etc., but I can't seem to find the right combination. The best I can get is a single click at a time. For example, I'd like to be able to click the arrow once, holding down the mouse button, and have the app auto increase an associated number label to the desired level without having to continually click the scrolling bar arrow.
Any help appreciated!
Shannon
[561 byte] By [
Shannon] at [2007-11-11 8:17:24]

# 1 Re: Using Scroll bars
try using a timer, when u click the arrow button, a timer gets enabled and does the scrolling, once the button loses focus, disable the timer.
major at 2007-11-11 17:25:40 >

# 3 Re: Using Scroll bars
Thank you, Major!
Marco, I'm using the standard vertical scroll bar that comes in the basic toolbox. The values I'm working with are too numerous to use a slider alone, and I'm using the scroll bar for fine increment adjustments. I just don't want my user to have to click it over and over again to go up and down the set of input values if they can just click once and hold down the mouse button. I see this done in other apps all the time, but can't figure out how to do it myself.
I see the potential in Major's suggestion, but I can't help but think there must be a cleaner way (although something is much better than nothing). I thought perhaps VB had a built-in way to do this and I just didn't find it. I guess not.
Shannon
# 4 Re: Using Scroll bars
I do not understand: if you click in the scrollbar (both in the buttons and in the side area) and keep the mouse down, the scrollbar will continue to change automatically. There is no need for a timer
Marco
EDIT: just use the scrollbar Change event
mstraf at 2007-11-11 17:28:42 >

# 5 Re: Using Scroll bars
Hmmm ... yep, I was focused on the key down, key up, click, key press events ... the change event is the only one I didn't consider. *frown*
This is why I come to dev-archive before pulling out my hair (most of the time). Then you guys leave me feeling silly for asking such an obvious question.
Thanks Marco!
# 6 Re: Using Scroll bars
...
Then you guys leave me feeling silly for asking such an obvious question.
Thanks Marco!
"a question is obvious only if you know the answer" :WAVE:
Marco
mstraf at 2007-11-11 17:30:51 >
