Menu.AddItem2
 
 
 

Menu.AddItem2

Introduced

v11.0 (2013)

Description

Adds a menu item at to end of the menu. This method is similar to Menu.AddItem but specific to the python language.

C# Syntax

Object Menu.AddItem2( String in_pLabel, siMenuItemStyle in_style );

Scripting Syntax

oReturn = Menu.AddItem2( Label, Style );

Return Value

If the style is siMenuItemSubmenu the newly created Menu is returned. Otherwise the newly created MenuItem is returned.

Parameters

Parameter Type Description
Label String The menu item label.
Style siMenuItemStyle The menu item style, for example siMenuItemSubmenu.

See Also

MenuItem Menu.AddSubMenu Menu.AddSeparatorItem Menu.AddCommandItem Menu.AddCallbackItem Definition Callbacks for Menus Simple Menu plug-in example