GoView within a GoView

Hey,

I am developing a process modelling application. Everything has been going well until I had the requirement to be able allow a user to add a new diagram entity which represented another process… and to see that process. My first cut at this was too use a GoSubGraph to display the embedded process… for example, the user would see the (root) process and there would be a node which represented the sub process… this worked somewhat well but I continue to have problems with layout. I then thought it would be easier/smarter to embed a GoView in the GoSubGraph and show the sub process in that… this would allow me to also reuse the code which I used to display the (root) process by using common functions which simply take the view that should be used to display the diagram entities. Unfortunately, it appears as though the GoControl seems to be the only way to do this and the GoControl is only visible when in an ‘edit mode’.

Just wondering if there is a easy way to embed a GoView within another as described above. I have added a screen shot to this in hopes that it will clarify what I am trying to do (I am sure I did not explain myself very well and an image usually tells the whole story)

Any thoughts would be greatly appreciated.

I played with GoViews within GoViews a couple of years ago. It sort of kind of works, but it’s
really outside the way we designed this all to work, so it just comes off feeling weird.

I think SubGraphs really are the way to solve this sort of design issue.

What were your layout problems with subgraphs? Note you have to layout the subgraphs separately (see the sample in SubGraphApp).

Thanks for the quick reply… you may have noticed from attached image the node that has the subgraph (node with the text ‘Function’), the process nodes are messed up (overlapping and the start node should be at the top). I tried to buffer the node positions when they are added to the subgraph, and then set their (proper) locations again after the subgraphs Expand() method is called but they still do not go to those proper locations… not sure what is happening. I took a look at the sample app but I still do not really understand what the statement ‘layout the subgraphs separately’ means.

It is also commonplace to “drill-down” by opening up a separate “window”. This also avoids the problem of not having enough room to show the “subgraph”, which may cause the outer graph to have to be rearranged.