Change properties inside ContainerControl


How can I change label.text inside ContainerControl?
I have added ContainerControl to window like this:

dim coco As ContainerControl1 coco = new ContainerControl1 coco.EmbedWithin(Window1, 100, 0) coco.label.Text="work"

How can I change label.text later in some other event?

And is it possible to close this coco?


Provided that “label” (but this is not a valid name for a label) has Public scope you can access it from everywhere as:

coco.close will close the container

I must be doing something wrong.
When I try to access coco.label1.text or what ever, I get error “This Item does not exist” and highlights coco.
Label has public scope…

You DIM coco inside the method, so it won’t be available anywhere else in your code. You must keep a reference to the container that is more global in scope - a property on the window, perhaps.