Highlight links inside GoSubGraph

Using the flowgrammer smaple application i added a GoSubGraph object to the flow. everything looks fine except i can’t drag-drop external/internal objects on links inside the GoSubGraph. the links inside the GoSubGraph even don’t highlight when an object is dragged over them. i believe this is because i used the GoSubGraphBase.ReparentAllLinks… method (to get them be layout correctly).
Hope my question was clear enough.


Sounds like you can test your theory by pulling out the ReparentAllLinks code…

Done! but as i mentioned pulling out this code hurt the GoLayoutLayeredDigraph. i’m doing this recursion as explained in the layout tutorial page 41 and to get it work correctly i need to Reparent the links inside the GoSubgraph…
if i don’t do this reparent stuff then the links manage to highlight but the layout goes wrong.

Hope this help.

Actually, one does normally want to make sure all of the links are properly owned by the first common parent GoSubGraphBase.

If you called AddCollection, you can specify true for the second argument, so that it automatically reparents the links as needed.

I suspect the problem is that the external drag-and-drop code in ChartView assumes that all of the nodes and links are top-level objects.

I suggest you replace all uses of the “TopLevelObject” property with the “ParentNode” property in the ChartView class.

OK, did that and it works fine - the inner link is highlighted as expected but now the dropping doesn’t work as expected. I’m checking it and i’ll get back with more information.
Thanks for this great support!!!