c# - MouseEvent not working in chart Area -
i writing program gives quick visual display of mysql data, add feature gives coordinates of mouse location when mouse on chart.
problem is, mouse events work outside chart area in red, anytime try mouse event such as: move/click/rightclick/scroll on chart area (red area), not work.
here simple piece of test code used:
void chart1_mouseclick(object sender, mouseeventargs e) { messagebox.show(""); }
clicking displays message box if clicked outside chart area (i.e. below red box in picure), while mouse on chart, nothing happens.
the answer add line of code in form designer:
(thanks comment jstreet letting me know)
this.chart1.mouseclick += new system.windows.forms.mouseeventhandler(this.chart1_mouseclick);
Comments
Post a Comment