Front/Back Display

What is the proper way to move overlapping objects to front/back in terms of display? I have a stroke overlapping a comment, and I would like the stroke’s overlapped parts to be behind the comments. How is this achieved?

You can create a layer before the default layer, and add strokes/links to that.

Treeapp, for example:

[code]// all links go in a layer behind all nodes
goView1.Document.LinksLayer = goView1.Document.Layers.CreateNewLayerBefore(goView1.Document.DefaultLayer);
Note: objects that have the IGoLink interface will be added to the LinksLayer by GoDocument.Add. If you really did mean "GoStroke" as opposed to "GoLink", you'll have to handle that.

So how will I handle that? What visual calls do I make to create the overlay visual?


No, I was asking what visual calls (under the hood) create the effect to layer objects over each other?

oh. It’s simply the order they are drawn in. The layers are drawn back-to-front (i.e. the first layer in the list is the furthest back visually).

Likewise, each object within a layer is drawn in the order they are in the GoLayer collection. So, even within a layer, the objects drawn first will appear behind the ones drawn later.
Also see the FAQ item titled "How do I make what the user selects appear in front of everything else?".
"Picking" is just the reverse of drawing. The layers (and the objects within them) are iterated backwards until an object is found. (Picking is actually more complicated that than... but I'm in the middle of a rathole here already, so I'll just stop now.)