context menu

Chris Ara
04-25-2006, 06:34 PM
hi people

I am trying to make a context menu that as sub menus as well. I know you use the contextmenu menuitem.add function to add a menu such as a menu named edit , but then how do I add a sub menu to this menu. so I can have a context menu that pops up on right click with sub menus.

thanks , chris.

vbtricks
04-26-2006, 02:26 AM
Salut,

well these added menuitems do have a MenuItems member as well. So the following should work:

Dim a As MenuItem
a = New MenuItem("Layer1")
a.MenuItems.Add(New MenuItem("Layer 2"))
myMenu.MenuItems.Add(a)


Stefan

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum