Control.setMenu

Sets the receiver's pop up menu to the argument. All controls may optionally have a pop up menu that is displayed when the user requests one for the control. The sequence of key strokes, button presses and/or button releases that are used to request a pop up menu is platform specific. <p> Note: Disposing of a control that has a pop up menu will dispose of the menu. To avoid this behavior, set the menu to null before the control is disposed. </p>

@param menu the new pop up menu

@exception IllegalArgumentException <ul> <li>ERROR_MENU_NOT_POP_UP - the menu is not a pop up menu</li> <li>ERROR_INVALID_PARENT - if the menu is not in the same widget tree</li> <li>ERROR_INVALID_ARGUMENT - if the menu has been disposed</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 Control
void
setMenu

Meta