Example for NShowHideSubtree Decorator Click Event


Author
Message
Jaideep Tandon
Jaideep Tandon
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)
Group: Forum Members
Posts: 5, Visits: 1
Hello All,

I am new in this tool
therefore can any one please suggest me

How to call decorator click event?


Thanks
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,

It is unclear from your question what are you trying to do. If you want to expand/collapse a toggle decorator (i.e. an expand/collapse decorator or a show/hide subtree decorator), you should call its ToggleState method.

If you want to subscribe to the click event of the decorator, you should use the NodeClick event of the drawing document's Event Sink service. Here's some sample code:

document.EventSinkService.NodeClick += OnNodeClick; 

...

 

private void OnNodeClick(NNodeViewEventArgs args)

{

      NShowHideSubtreeDecorator decorator = args.Node as NShowHideSubtreeDecorator;

      if (decorator != null)

      {

            // Your code here

            args.Handled = true;

      }

}



Best Regards,
Nevron Support Team


Jaideep Tandon
Jaideep Tandon
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)
Group: Forum Members
Posts: 5, Visits: 1
Hi,
I used your code But It not go to that method OnNodeClick when i click on decorator.

Currently i am using NDrawingView1_AsyncClick method to detect decorator. but this method called each time wen you click on image

But I want a method called only when i click on decorator.

Thanks
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