This method allows you to add custom menu items to the HotDocs library menus. For example, you can add an item to the HotDocs Help menu to display your own "About" dialog box. When a user selects the item from the menu, the OnUserMenuItemClickedEvent event is fired to notify your application that the menu item was chosen.
The AddUserMenuItem2 method is very similar and performs the same basic task as this method. However, the AddUserMenuItem2 method gives you more control over the custom menu item. For example, you can specify the position of the item in the menu and the icon that appears next to the item.
int AddUserMenuItem ( string menuTxt, HotDocs.HDLIMENU menu )
Parameters | Description |
menuTxt | The text to be inserted into the menu. To insert a separator bar in the menu, use a single hyphen (-). |
menu | The name of the HotDocs menu to which the menu item will be added. This must be a member of the HDLIMENU enumeration. |
A menu handle used to track when a user clicks the custom menu item.
This method only manipulates the menus in the HotDocs library window. To add items to the menus in the assembly window, see the Assembly.AddUserMenuItem method. You can also create HotDocs plug-ins that further customize menus in the library window.
The following Visual C# example adds a separator bar followed by a menu entry to the File menu in the HotDocs library window:
public class ExampleCode { static void Main() { HotDocs.Application app = new HotDocs.Application(); long handle; app.AddUserMenuItem("-", HotDocs.HDLIMENU.LI_FILE); handle = app.AddUserMenuItem("User Menu Entry #1", HotDocs.HDLIMENU.LI_FILE); } }