GoImage not visible that is added in a layer

Hi,



I have a class Document derived from GoDocument. I am adding the GoObjects in the default layer of this class. Now i want to add picture in the Document so that if we drag drop GoObject above the picture.For this i have added one layer before the default layer -

pictureGoLayer = Document.Layers.CreateNewLayerBefore(Document.DefaultLayer);

pictureGoLayer.Add(picture);

pictureGoLayer.AllowView = true;

picture.visible = true ;

(picture is a GoImage)



The picture is coming in the background but it is not visible.Only if we click in the position where we have drag drop, a red-boundary appears to denote selection.



Please help me how i can make the picture visible.



Thanks in advance

If you just add the image to the default layer, does it work? I’m guessing it’s not a layer issue, but more likely to be a way the image resource is being specified.

Hi,



I tried adding the picture in the default layer.But it doesnot work, picture is visible but the other Goobjects that is added before the picture, goes below the picture.you can check the Demo1.exe.There suppose you drag and drop goobject1 in the sheet. Then you drag drop goObject2. It will be placed over the goObject1 but goObject1 cannot be placed over goObject2.Is there any way to do the vice-versa…i.e both goObject1 and goObject2 can be placed over each other.







Thanks in advance

Objects are drawn in the order they are in the layer. This means that the objects later in the list are on “top” of objects earlier in the list. To “Pop” an object to the top, simply edit its location in layer collection and place it at the end of the list.



Planogrammer has a sample of this…



<br /> // When an object is selected, move it forward/frontward in the Z-order, <br /> // so that it won't be occluded/hidden by another Display or its Items. <br /> private void goView1_ObjectGotSelection(object sender, Northwoods.Go.GoSelectionEventArgs e) { <br /> GoObject top = e.GoObject.TopLevelObject; <br /> top.Layer.MoveAfter(null, top); <br /> } <br />