AddItem (Menu)
Description
Adds a menu item at to end of the menu.
The most common use of this method is to add a submenu, onto which further MenuItems can be attached. This is useful for grouping similar actions together when there are many options in the menu.
Note: To add a MenuItem that invokes a command or callback it is better to use Menu.AddCommandItem or Menu.AddCallbackItem.
Tip: See the C++ API and Python examples for creating a Simple Menu plug-in to see this method in action.
Scripting Syntax
Menu.AddItem( Label, Style )
C# Syntax
MenuItem Menu.AddItem( String in_pLabel, siMenuItemStyle in_style );Parameters
|
Parameter |
Type |
Description |
|
Label |
The menu item label. |
|
|
Style |
The menu item style, for example siMenuItemSubmenu. |
Return Value
If the style is siMenuItemSubmenu the newly created Menu is returned. Otherwise the newly created MenuItem is returned.
See Also
|
|
|
Autodesk Softimage v7.5