Cyotek Forums

Source Code => Source Code => Topic started by: schorge on April 29, 2015, 01:59:05 PM

Title: Disable ScrollBar / AutoScroll
Post by: schorge on April 29, 2015, 01:59:05 PM
Frist of all, thank's for this great tool!

But i have a problem:
i'd like to disable the scroll-bar with:

imageBox1.AutoScroll = false;

but then i cant't scroll with the mouse-wheel?

can anybody help me?
Title: Re: Disable ScrollBar / AutoScroll
Post by: Richard Moss on April 30, 2015, 04:52:40 PM
Hello,

I'm not quite sure what you mean regarding scrolling with the mouse wheel - the mouse wheel doesn't generally scroll the control, but rather zooms the control.

However, this is actually broken if you do set AutoScroll to false for reasons I haven't had time to work out and fix yet. Is this what you mean when you say you can't scroll with the wheel?

Regards;
Richard Moss
Title: Re: Disable ScrollBar / AutoScroll
Post by: wmjordan on August 05, 2015, 02:05:45 AM
Hi, you can override the OnMouseWheel event and scroll the image.


protected override void OnMouseWheel (MouseEventArgs e) {
base.OnMouseWheel (e);
ScrollTo (HorizontalScroll.Value, VerticalScroll.Value - e.Delta);
}