Add layer to IconicApp4

Hello support,

I try to add layers to the demo application IconicApp4. The way I create the layers are:

HintergrundLayer = GoView1.Document.Layers.CreateNewLayerAfter(Nothing)
KomponentenLayer = GoView1.Document.Layers.CreateNewLayerAfter(Nothing)

Also I have a combobox where i can slect the current defaultlLayer

GoView1.Document.DefaultLayer = KomponentenLayer

When I now drag a object from the goPalette i think the object goes to the defaultLayer but it seems that the object don’t go to a layer. When I switch the layer from KomponentenLayer to HintergrundLayer and set the KomponentenLayer to AllowSelect
= false and AllowEdit
= false I still can delete the objects.

Any hint what I’m doing wrong here? I want to try the use of diffrent layers for an application.

Thanks a lot,

Are you doing anything to override standard drag and drop?

No, I think thats the way to do it?

Drag and Drop will copy to the layer that matches layer.Identifier. The Palette and the default GoView layer both have Identifier 0. So… the “drop” code never gets to the “DefaultLayer” code.

add this:

  goPalette1.Document.DefaultLayer.Identifier = 99999;

then your DefaultLayer comboBox should work.