Profile Picture

How to capture click event on composite shape elements e.g. Text Primitives?

Posted By Niranjan Singh 8 Years Ago

How to capture click event on composite shape elements e.g. Text...

Author
Message
Niranjan Singh
Question Posted 8 Years Ago
View Quick Profile
Forum Member

Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)

Group: Forum Members
Last Active: 4 Years Ago
Posts: 49, Visits: 179
Hi,
  • Is there any way to create hyperlink label in the shape library document.
  • Can i hot track shape element? for example in attached image, a text primitive which automatically create when we group shape elements.
  • Can we capture in any event that shape element is clicked but we can capture shape click event as specified in the article - Capture the event when a user clicks on a node in a flowchart
Is there any work around to implement this functionality?? 

See attached image create from Library document and I want to convert a specific text primitive in hyperlink and that help me to do some operation on double click or click..

Thanks,
Niranjan 


Attachments
Composite Shape hyperlink.PNG (950 views, 64.00 KB)
Nevron Support
Posted 8 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: 15 hours ago
Posts: 3,054, Visits: 4,018
Hi,

You should subscribe to the NodeMouseDown event of the drawing document's event sink service:

document.EventSinkService.NodeMouseDown += OnEventSinkServiceNodeMouseDown;


This is a bubbling event that starts at the hit node (which is usually a diagram primitive) and bubbles up to the drawing document. The argument passed to the event handler contains a property Button for detecting the used mouse button and properties HitNode and Node that indicate the clicked node and the current node. When the event is bubbling up, the event handler is called multiple times and the Node property is changed on each call, but the HitNode stays the same.

In the event handler if the Node is the one you are interested in, then you should take the proper action, for example to open a web page in the default web browser in your case.

Best Regards,
Nevron Support Team



Niranjan Singh
Posted 8 Years Ago
View Quick Profile
Forum Member

Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)

Group: Forum Members
Last Active: 4 Years Ago
Posts: 49, Visits: 179
Hi,

Thanks for the detailed information. I am using Diagram control in Winforms application. Is this event work same as you told in Windows application also??

Thanks,
Niranjan

Nevron Support
Posted 8 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: 15 hours ago
Posts: 3,054, Visits: 4,018
Hi Niranjan,

If by "Windows application" you mean a WPF application, then yes, you can use the same event to handle Nevron Diagram node mouse down events. You can integrate Nevron Diagram for .NET in a WPF application using the WinFormControlHost.

Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic