Disable ScrollBar / AutoScroll

Started by schorge, April 29, 2015, 01:59:05 PM

Previous topic - Next topic

schorge

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?

Richard Moss

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
Read "Before You Post" before posting. Do not send me private messages. Do not expect instant replies.

All responses are hand crafted. No AI involved. Possibly no I either.

wmjordan

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);
}