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


How to capture click event on composite shape elements e.g. Text...
Author
Message
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
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


Niranjan Singh
Niranjan Singh
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
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
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
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
Niranjan Singh
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
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 (1.1K views, 64.00 KB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search