How would one go about doing a dim statement on the fly in an application?

Situation: Building multiple menu items in a contextual menu and multiple submenu items to go with said menu items, when the number of menu items with submenus is variable.

Looking at the New ContextualMenu Build example, they've got just one submenu. In there one has to dim the submenu and give it a name. This is all well and good in hard-wiring code when one knows the number of items that will have submenus, but what if any number of menu items could have submenus associated with them?

It looks like one has to dim submenus as they come up. One can't just use the statement...

dim submenu as new MenuItem("SubMenu")

....over and over again. One would lose anything that was built in any previous 'submenu' items. Would they not?

So, what is to be done? I'm sure this issue has come up before, but I'm unfamiliar with the solution.

Regards,

Chuck
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to