Accusoft NotateXpress 13
MenuAddItem Method

If the menu value is NX_Menu_Toolbar, then the tool parameter is the Tool ID that the menu is associated with.

If the menu value is NX_Menu_Context, then the tool parameter has no meaning and can be any value.

The top level menu ID for this menu item.

A menu ID of 4100-4200 is reserved for adding a menu separator bar.

The top level menu ID must be 20000 or greater for user items.

A long value that will be passed back in a MenuSelect event.
A long value that will be passed back in a MenuSelect event.
Description
Adds the given item for the specified menu.
Syntax
Visual Basic
Public Sub MenuAddItem( _
   ByVal Menu As NX_MenuType, _
   ByVal Tool As NX_AnnotationTool, _
   ByVal TopMenuID As Long, _
   ByVal SubMenuID As Long, _
   ByVal MenuText As String, _
   ByVal User1 As Long, _
   ByVal User2 As Long _
) 
Parameters
Menu
ValueDescription
NX_Menu_ContextThe right click menu for an element.
NX_Menu_ToolbarThe right click menu for each tool on the toolbar.
Tool
ValueDescription
NX_BlockHighlightTool(&H100C) - BlockHighlight tool.
NX_ButtonTool(&H100A) - Button tool.
NX_EllipseTool(&H1003) - Ellipse tool.
NX_FreehandTool(&H1007) - Freehand Tool.
NX_ImageTool(&H1009) - Image tool.
NX_LineTool(&H1006) - Line Tool.
NX_NoteTool(&H100D) - Note tool.
NX_NoTool(&H0000) - Disables annotation.
NX_PointerTool(&H1000) - Selection tool.
NX_PolygonTool(&H1004) - Polygon Tool.
NX_PolyLineTool(&H1005) - PolyLine Tool.
NX_ProtractorToolProtractor
NX_RectangleTool(&H1002) - Rectangle tool.
NX_RulerTool(&H100B) - Ruler tool.
NX_StampTool(&H1008) - Stamp tool.
NX_TextTool(&H1001) - Text tool.

If the menu value is NX_Menu_Toolbar, then the tool parameter is the Tool ID that the menu is associated with.

If the menu value is NX_Menu_Context, then the tool parameter has no meaning and can be any value.

TopMenuID

The top level menu ID for this menu item.

A menu ID of 4100-4200 is reserved for adding a menu separator bar.

The top level menu ID must be 20000 or greater for user items.

SubMenuID
The sub level menu ID for this menu item if this is to add a sub level menu item. Otherwise, this parameter should be 0.
MenuText
The text that will be displayed for this menu item.
User1
A long value that will be passed back in a MenuSelect event.
User2
A long value that will be passed back in a MenuSelect event.
Remarks
This method lets you add new items to the context menu and receive event notifications when these items are selected. 

The User# is a long value allocated by each menu item and reserved for use by the application to store a private long value to associate to a menu item.

See Also

NotateXpress Object  | NotateXpress Members  | Context Menus

 

 


©2019. Accusoft Corporation. All Rights Reserved.

Send Feedback