|
-
Mar 10th, 2008, 11:23 AM
#1
Thread Starter
Fanatic Member
pls suggest Scrollbar Values
im using scrollbars in my form, i want to know what values i should keep for SmallChange and LargeChange to work it smooth.
-
Mar 10th, 2008, 11:24 AM
#2
Re: pls suggest Scrollbar Values
That would depend on the size of your form and how much scrolling needs to be done.
How large is it?
-
Mar 10th, 2008, 11:33 AM
#3
Thread Starter
Fanatic Member
Re: pls suggest Scrollbar Values
i have a picturebox which will be scrolled, and picture box(S) height and width will be changed itself at run time
-
Mar 10th, 2008, 11:34 AM
#4
Re: pls suggest Scrollbar Values
 Originally Posted by chunk
i have a picturebox which will be scrolled, and picture box(S) height and width will be changed itself at run time
Through your code or the Form's Resize event?
-
Mar 10th, 2008, 12:02 PM
#5
Thread Starter
Fanatic Member
Re: pls suggest Scrollbar Values
yes i have it on Resize event of Form
-
Mar 10th, 2008, 12:56 PM
#6
Re: pls suggest Scrollbar Values
I like the page method: LargeChange = picHolder.Height. picHolder is the container with the image inside of it. Each largechange event moves the image a "page" at a time. SmallChange can be LargeChange\10 and if value = zero, then make it one. This way smallchange is 1/10th of large change. But by making smallchange > 1, user must use the thumb to scroll single lines of the image.
An option to allow finer control if smallchange>1, may be to check for mouse down on the change event & if, say the ctrl key was down, revert to single pixel movements? Just thinking out loud & would require some more thought.
-
Mar 10th, 2008, 01:14 PM
#7
Thread Starter
Fanatic Member
Re: pls suggest Scrollbar Values
i want my scrollbars to work as our Internet Explorer(S) explorer works with Small and Large change. what values i should set of them on design time
-
Mar 10th, 2008, 01:19 PM
#8
Re: pls suggest Scrollbar Values
Honestly, I don't think there is a magic formula. Each app will have its own requirement - Word will move maybe paragraphs at a time while IE may move IEFrames at a time. I think this is a designer's choice -- your choice. Setting them at design time is not the best option in my opinion. Scrollbars should always be adjusted to what needs to be scrolled.
-
Mar 10th, 2008, 01:24 PM
#9
Thread Starter
Fanatic Member
Re: pls suggest Scrollbar Values
ok i will try your previous solution to set at Run time
-
Mar 10th, 2008, 02:13 PM
#10
Thread Starter
Fanatic Member
Re: pls suggest Scrollbar Values
Code:
Private Sub Form_Load()
Dim VSmallVal As Long, HSmallVal As Long
VScroll1.LargeChange = PicBox.Height
HScroll1.LargeChange = PicBox.Width
VSmallVal = VScroll1.LargeChange / 10
HSmallVal = HScroll1.LargeChange / 10
If VSmallVal = 0 Then
VScroll1.SmallChange = 1
Else
VScroll1.SmallChange = VSmallVal
End If
If HSmallVal = 0 Then
HScroll1.SmallChange = 1
Else
HScroll1.SmallChange = HSmallVal
End If
End Sub
i wrote this code. do you want me to make some changes in it?
-
Mar 10th, 2008, 02:32 PM
#11
Re: pls suggest Scrollbar Values
Chunk, it looks good -- do what feels right. Is the scrolling now more agreeable? If you are happy with it, that's all that counts really. Play with a small 32x32 image and a larger one, say 512x512 or larger.
-
Mar 10th, 2008, 02:36 PM
#12
Thread Starter
Fanatic Member
Re: pls suggest Scrollbar Values
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|