Can someone give me some instruction on the proper way to add a menu item with click event to the Setup Menu of OD with a plugin? All I want is to launch my setup window from an item on the setup menu, but I can't seem to figure out how to add a menu item dynamically with it's own click event. I have added many controls to other forms with my plugin using the example code in the sample project, but I am not very familiar with menus and can't seem to figure it out.
Help anyone?
Adding Menu Item to Setup Menu
Re: Adding Menu Item to Setup Menu
It's been a very long time since I've done plugins so I don't remember quite what you have access to but if I wanted to dynamically add to Setup I would do the following:
My guess is that you would do this in the Plugins.HookAddCode(this,"FormOpenDental.Load_end"); call. This is assuming you have access to menuItemSettings (which is the Setup menu item)
Hope that helps.
Code: Select all
menuItemSettings.MenuItems.Add("Click Me",new System.EventHandler(this.menuItemClickMe_OnClick));
Hope that helps.
The best thing about a boolean is even if you are wrong, you are only off by a bit.
Jason Salmon
Open Dental Software
http://www.opendental.com
Jason Salmon
Open Dental Software
http://www.opendental.com