5

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

Braiam
  • 1
  • 11
  • 47
  • 78
iEmo
  • 81
  • 1
  • 3

2 Answers2

6

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

zedGraphControl.IsEnableWheelZoom = false;
Otiel
  • 18,404
  • 16
  • 78
  • 126
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.

Gacek
  • 10,184
  • 9
  • 54
  • 87