Layer problems


I want to get a node into foreground when clicked.
There are functions in the samples that work fine so far.
But if I try to add some more functionality I fail badly:
i.e. Click on Node-> Node to foreground, Click on another Node->only this Node to foreground, this is correct.

But the nodes should also go back to their origin-layer if they loose their focus. I tried and tried and tried. Was not able to get this to work.

I’ve created to layers: Basic (Behind all others) and Selected (in Front of all others)

Didn’t get clicked node back to origin layer but to background.


Did you copy the OnGotSelection and OnLostSelection methods that are defined on ClassNode in the Classier sample? OnLostSelection there does move the object from the “Selected” layer to the default one.
If you are doing something different, what are you trying?


I’ve copied exactly these methods with no changes to it.

And copied also the layer initialization from the mainform.

Made some tests (without copied layer initialization and so on…)