Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable the zooming by the mousewheel for ZedGraph

Tags:

zedgraph

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

like image 398
iEmo Avatar asked Sep 15 '10 07:09

iEmo


2 Answers

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

zedGraphControl.IsEnableWheelZoom = false;
like image 175
Otiel Avatar answered Oct 08 '22 17:10

Otiel


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.

like image 31
Gacek Avatar answered Oct 08 '22 17:10

Gacek