Menu.insert

Overview | Methods | This Package | All Packages

Menu.insert

Adds a menu item to this menu at the specified index.

Syntax

public void insert( int index, MenuItem item )

Parameters

index

The zero-based index of the position at which to insert the menu.

item

A MenuItem object that specifies the item to add.

Exceptions

WFCException thrown if the item specified in the item parameter is already in another menu.

Remarks

If a menu item currently occupies the slot designated by the index parameter, the item and all items after it are moved out one slot to make room for the new item.

A menu item can be contained in one menu at a time and may not be added more than once to the same menu.