Un-Embed ContainerControls

I’ve implemented @Christian_Schmitz’ scrolling ContainerControl list as described here: Smooth scrolling list control with ContainerControls

It works fine - loads all my CC’s into a nice scrolling list.

Now I need to be able to clear the previously loaded list and replace it with a new list, but there doesn’t seem to be a clear way of un-embedding or destroying the existing list. In this topic: Embeded container control - #12 by Clifford_Coulter @Tim_Hare said “Once you embed a container, you cannot un-embed it” :astonished:

Surely there must a way. I wouldn’t mind Nil-ing out all the containers if that would work (it doesn’t seem to) but I’d rather not have to close the parent window and start with a new one.

Yes, maintain a reference to the container then CC.Close when you want to destroy it. Nil your reference afterwards.

1 Like

Perfect, thanks @Tim_Parnell !