Author Topic: Add context menu items?  (Read 6865 times)

Mugwump

  • Newbie
  • *
  • Posts: 5
Hi,

Is it possible to add more items to the right click context menu?
For instance I can add items under the tools menu like this

mbApiInterface.MB_AddMenuItem("mnuTools/Custom", "Custom thing", MenuClicked);

Guessing there is some way of using this to do what I want?

Mugwump

  • Newbie
  • *
  • Posts: 5
This is the menu I would like to extend with my plugin. Is this possible?


psychoadept

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 10691
I know the Additional Tagging & Reporting Tools plugin has a sub-menu in that menu, so maybe look at the source code for it?
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest beta patch (3.5)
(Unzip and overwrite existing program files)

Mugwump

  • Newbie
  • *
  • Posts: 5
Figured it out from "Additional Tagging & Reporting Tools Plugin" source.

So I'll post it in case it is useful for anyone else trying to do the same in future.

Code
ToolStripMenuItem mainMenuItem = (ToolStripMenuItem)_mbApiInterface.MB_AddMenuItem($"context.Main/{PluginName}", null, null);
mainMenuItem.DropDown.Items.Add("Zip", null, MenuClicked);