Add an event to a Container control

I want to create a new event and add it to a ContainerControl, so it can be used with Add Handler to the instance.

If I add an event definition to the ContainerControl, then it shows up fine in the Add Handler menu for the instance.

But how do I link it to a method in the ContainerControl ?

Tried this in the Open event of the ContainerControl class but Xojo says me.myEvent does not exist, though myEvent appears fine in the Add Handler instance right click menu.

AddHandler me.myEvent addressOf myEventMethod

Will appreciate assistance.

If you have a method in your control that you want to use from the parent window then you can reference it by containercontrolname.methodname().

If you put code into the event handler in the parent window then it is fired by using RaiseEvent EventName [(parameters)] from the code in the control.

(Hope this makes some kind of sense)

I must have been tired. What I wanted to do was to add events to the class, then trigger them from inside the class so the inside could have code in the event handler. For a while the logic escaped me. All works fine, now.

Thank you.