Author Topic: AddMenuItem - Creating sub-menus  (Read 3181 times)


  • Newbie
  • *
  • Posts: 12

How do I create a menu with sub-menu items?

This works (as per the docs)
            mbApiInterface.MB_AddMenuItem("mnuTools/xx", "hello", menuClicked);

This doesn't work;
            mbApiInterface.MB_AddMenuItem("mnuTools/xx/aa", "hello", menuClicked);
            mbApiInterface.MB_AddMenuItem("mnuTools/xx/aa/", "hello", menuClicked);

I want to create about three menu items, so it makes sense for them to be sub-items

Thanks in advance


  • Administrator
  • Hero Member
  • *****
  • Posts: 33705
cast the result from mbApiInterface.MB_AddMenuItem("mnuTools/xx", "hello", menuClicked) as a ToolStripMenuItem
and add the sub-menu items directly to that