Accusoft.ImagXpressSdk Namespace > ToolbarContextMenu Class : AddItem Method |
'Declaration Public Sub AddItem( _ ByVal tool As Tool, _ ByVal topMenuId As Integer, _ ByVal subMenuId As Integer, _ ByVal menuText As String, _ ByVal user1 As Integer, _ ByVal user2 As Integer _ )
'Usage Dim instance As ToolbarContextMenu Dim tool As Tool Dim topMenuId As Integer Dim subMenuId As Integer Dim menuText As String Dim user1 As Integer Dim user2 As Integer instance.AddItem(tool, topMenuId, subMenuId, menuText, user1, user2)
public void AddItem( Tool tool, int topMenuId, int subMenuId, string menuText, int user1, int user2 )
This method adds a new menu item to the specified menu. If the Menu is Toolbar, ten the Tool parameter is the Tool ID that the menu is associated with.
If the Menu is Context, the Tool parameter has no meaning and can be any value.
If the menu item is to be a top-level menu item, then the subMenuId should be 0. A subMenuID menu item can only be added when a topMenuId has been added with a previous subMenuId set to 0.