Even if I overwrite the virtual method FinishExpand in my class definition it still does not get invoked at run time.
here is my code:
[code]
public new void FinishExpand()
{
base.FinishExpand(hpos);
//Do my stuff
}
public new void FinishCollapse()
{
base.FinishCollapse(sqrect);
//Do my stuff
}
[/code]
At run time Idynamically create a subgraph and dynamically populate it with other elements by dragging and dropping them inside the subgraph.
Then I create my links,etc.
The issue is this:
When I collapse the subgrph, I end up with this long arrow stretching for the entire height of the formerly expanded subgraph and thus I watste too much space even when the subgraph is collapsed. I need to shorten the arrow when I collapse the partucular subgraph which is why I need to call the layout.PerformLayout() in that event.
All my instances are created dynamically and I don't know in advance how many of them I will have.
Is there a property or a method of the layout which automatically takes care of that? OR if notare you aware of how to hande taht situation?
I agree,and I did that because I wanted to change the function signature to not accept the same parameters as the base funtion since all I want to do is to call the PerformLayout.
But what really stops me from continuing is the rest of the issue - how to get to that method for a particular instance of the class at run time.
I can not implement an event handler since this is not an even so I really don't know what to do.
I strongly recommend not making any modifications to either the GoView or its GoDocument during a Paint event. That can cause all kinds of surprising and undesirable behavior.
That’s unlikely to be the time at which you want to do anything.
Do you just want this code to run when the user clicks on the GoSubGraph.Handle? If so, you could implement a GoView.ObjectSingleClicked event handler, and check whether the GoObjectEventArgs.GoObject is a GoCollapsibleHandle. This latter check is useful to avoid running the code when the user clicks on some other object.
That is exactly what I needed to know - the name of the event and also how to know that it was trigerred by a click on he handle and not by something else.