ContainerControl Events

What I try to do is building a menu, like you see on websites.
So I have a ContainerControl Called “MyMenu”
In that Control I have a ContainerControl called “MyMenuItem”, which is part of a ControlSet.

In the MyMenu I have a method to add an item, and set some properties like Caption, Tag, etc…
I actually got it to work so far.
But when I add an EventDefinition to the MyMenuItem it goes wrong. The raised event does not respond.

Before I continue to wreck my brain, is it even possible to raise events in WebContainers? And also to passing the events to a parent container?

Any suggestion of what my approach would be?

I’ve done this before and created my own web menu items. I essentially create a container of containers as it creates more customization options. Then in the child container events I do stuff like:

if me.parent isA parentContainer then dim parentC = parentContainer(me.parent) parentC.doSomeParentEvent(me)

The parentContainer keeps an array property of its child containers and I have methods to reposition, add, and remove containers.

I built my own menus as well. The default menus do not properly scroll if there are more menu items than screen space. They just extend beyond the screen boundaries. Using a listbox in a WebContainer, I made my own (thanks Michael B).