Page 1 of 1

detecting a mouse click in empty space

Posted: Thu May 19, 2016 8:52 pm
by greggorob64
I'm running into an issue where I need to detect when the user clicks in 'negative' space. Is there a way to do this? By negative space, I just mean any space on the ViewXY that doesn't have a trace, annotation, etc.

I have special mouseclick handlers for things mentioned above, which allows me to know: I clicked on the sampledataseries, or sampledatamarker, or annotation. I have no way of answering know what I clicked on when I do negative space (right now as close I can get is Chart_MouseClick)

Do I have any options? Is there a hittest method I'm missing that can detect if I'm on a feature?

Re: detecting a mouse click in empty space

Posted: Fri May 20, 2016 4:25 pm
by ArctionPasi
You can use chart.GetActiveMouseOverObject(). If it returns null, it's not over anything (mouse-interactive object).

Re: detecting a mouse click in empty space

Posted: Mon May 23, 2016 4:04 pm
by greggorob64
Thanks, this should work great!