Object Mouse events passed to Diagram

MouseDown on a Control (OnDControlMouseDown) also triggers the Diagram MouseDown event.

As I have different actions for MouseDown on a control and MouseDown on the Diagram this is problem for me. I can easily create a global flag to block the Diagram MouseDown actions if triggered by the Control MouseDown but this seems like a very crude solution. Is there some elegant way of detecting (or blocking) the source of the trigger?

You can simply check if the mouse is at a diagram control by using DControlAtPos method before taking the action.

Thanks for the tip.
There are so many undocumented methods and properties with Diagram Studio it's hard to find the one you need!

1 Like