开发者

Why does changing the LargeChange value of a scrollbar in C# break it?

This doesn't really make sense to me. My scroll bar works perfectly if LargeChange is set to 1 but if I set it to 10 it doesn't scroll all the way. If I set it to 100 I can't scroll even further. SmallChange is set to 1 for all of these examples.

I guess what could be happening maybe is that if LargeChange is 10 and the Maximum is 100, for example and if the Value is 95 then you would not be able to scroll at all but even at that value I cannot do a small change at all. This doesn't make any sense to m开发者_如何学Ce. Can someone explain?


I am not sure I understand what you are asking but according to http://msdn.microsoft.com/en-us/library/system.windows.forms.scrollbar.largechange.aspx both values SmallChange and LargeChange are "relative" to the scrollbar maximum...

On what scrollbar are you seeing this ? PictureBox ?

EDIT - as per comment:

IF I understand you correctly you will need to something similar to this http://www.codeproject.com/KB/miscctrl/understandingScrollbars.aspx to make it work...

Another point to keep in mind:

User interface guidelines suggest that the SmallChange and LargeChange properties are set relative to the size of the view that the user sees, not to the total size including the unseen part. For example, if you have a picture box with scroll bars displaying a large image, the SmallChange and LargeChange properties should be set relative to the size of the picture box, not to the size of the image.

see http://msdn.microsoft.com/en-us/library/system.windows.forms.scrollbar%28v=VS.100%29.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜