c# - MouseEvent not working in chart Area -


chart

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

Popular posts from this blog

java - HTTP Status 500 - An exception occurred processing JSP page /second.jsp at line 15 -

SQL Server - MyCTE query based on 24 hour period (next day) -

php - Using str_replace to translate a MySQL Table in html -