I am trying to connect two objects automatically when one is dropped on the other.
I have overridden the DoExternalDrop method in GoView and tried to use PickObject() to get the object I am dropping onto like in the example code for flowgrammer.
But the object that it keeps getting it the one I am dropping?
I just want to be able to drop a node on another node and connect them. Or drop a node on a link and insert that node into the diagram on that link.
At the moment this is the code I am trying:
Point screenPnt = new Point(evt.X, evt.Y);
Point viewPnt = PointToClient(screenPnt);
PointF docPnt = ConvertViewToDoc(viewPnt);
GoObject over = this.PickObject(true, false, docPnt, false);
I have also tried this
PointF docPnt = ConvertViewToDoc(viewPnt);
GoObject over = this.PickObject(true, false, docPnt, false);
New to GoDiagram and learning the basics.