Nevron Forum

Automatic Resizing After Show/Hide Subtree Decorator Click

https://www.nevron.com/Forum/Topic4005.aspx

By Eric Sweet - Thursday, August 19, 2010

Hi,

I'm trying to make use of your example in the Document Object Model - Decorators - Show/Hide Subtree Decorators sample. I've integrated much of the code from your sample into my project, and the decorators work, but the chart does not resize like yours does when I expand or collapse one or any of the trees. Is there an event I need to subscribe to that I'm overlooking? Can you point me to the particular sub or code section that triggers this behavior?

The only major differences between your code and mine is that I'm using table shapes and tipover layout.

Thanks for any help,
Eric
By Nevron Support - Thursday, August 19, 2010

Hi Eric,

In order to achieve this behavior you should apply the layout each time a subtree is shown/hidden. Click on the View Source tab of the Show/Hide Subtree Decorator example to see how to do this in code. Pay more attention to the NodePropertyChanged event handler (it is called when a subtree visibility has changed) which starts a timer and when this timer's tick event is fired, the timer applies the layout.

By Eric Sweet - Friday, August 20, 2010

Thanks, I missed adding the AttachToEvents method call, once I did it worked.

Appreciate the help.
Eric