How to disable the zooming by the mousewheel for ZedGraph
Asked Answered
E

2

5

I want to display a non-zoomable ZedGraph control. How do I disable the mousewheel zooming function in ZedGraph?

Estrange answered 15/9, 2010 at 7:56 Comment(0)
B
6

If you wish to only disable the zoom by mouse wheel feature, you can use:

zedGraphControl.IsEnableWheelZoom = false;
Bisset answered 9/9, 2011 at 13:21 Comment(0)
W
1

If zgc is your ZedGraphControl instance, use:

zgc.ZoomButtons = MouseButtons.None;
zgc.ZoomButtons2 = MouseButtons.None;

This will disable zooming by selecting area with mouse.

You will also need to set:

zgc.ZoomStepFraction = 0;

in order to disable zooming using mouse wheel.

Weeping answered 16/9, 2010 at 10:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.