MenuItem.setMenu

Sets the receiver's pull down menu to the argument. Only <code>CASCADE</code> menu items can have a pull down menu. The sequence of key strokes, button presses and/or button releases that are used to request a pull down menu is platform specific. <p> Note: Disposing of a menu item that has a pull down menu will dispose of the menu. To avoid this behavior, set the menu to null before the menu item is disposed. </p>

@param menu the new pull down menu

@exception IllegalArgumentException <ul> <li>ERROR_MENU_NOT_DROP_DOWN - if the menu is not a drop down menu</li> <li>ERROR_MENUITEM_NOT_CASCADE - if the menu item is not a <code>CASCADE</code></li> <li>ERROR_INVALID_ARGUMENT - if the menu has been disposed</li> <li>ERROR_INVALID_PARENT - if the menu is not in the same widget tree</li> </ul> @exception SWTException <ul> <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> </ul>

class MenuItem
void
setMenu

Meta