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

Spicefly

  • Newbie
  • *
  • Posts: 12
Hi

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

Steven

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