Profile Picture

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

Posted By Niranjan Singh Last Year

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

Author
Message
Niranjan Singh
Question Posted Last Year
View Quick Profile
Forum Member

Forum Member (40 reputation)Forum Member (40 reputation)Forum Member (40 reputation)Forum Member (40 reputation)Forum Member (40 reputation)Forum Member (40 reputation)Forum Member (40 reputation)Forum Member (40 reputation)Forum Member (40 reputation)

Group: Forum Members
Last Active: Last Month
Posts: 46, Visits: 155
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 (82 views, 64.00 KB)
Nevron Support Team
Posted Last Year
View Quick Profile
Supreme Being

Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)

Group: Moderators
Last Active: 2 days ago @ 8:33 AM
Posts: 2,593, Visits: 2,279
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 Last Year
View Quick Profile
Forum Member

Forum Member (40 reputation)Forum Member (40 reputation)Forum Member (40 reputation)Forum Member (40 reputation)Forum Member (40 reputation)Forum Member (40 reputation)Forum Member (40 reputation)Forum Member (40 reputation)Forum Member (40 reputation)

Group: Forum Members
Last Active: Last Month
Posts: 46, Visits: 155
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 Team
Posted Last Year
View Quick Profile
Supreme Being

Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)

Group: Moderators
Last Active: 2 days ago @ 8:33 AM
Posts: 2,593, Visits: 2,279
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