uicontextmenu
Create context menu component
Description
creates a context
menu in the current figure and returns the cm
= uicontextmenuContextMenu
object. If
a figure does not exist, then MATLAB® calls the figure
function to create one.
To enable the context menu to open in the figure, you must also take these steps:
Assign the context menu to a UI component or graphics object in the same figure.
Create at least one child
Menu
object within the context menu.
creates a context menu with property values specified using one or more name-value
arguments. Specify name-value arguments with either of the previous syntaxes.cm
= uicontextmenu(___,Name,Value
)
Examples
Input Arguments
Tips
To display a context menu interactively in a running app, it must:
Have at least one menu item.
Be assigned to a UI component or graphics object in the same figure.
To open a context menu programmatically, use the
open
function. The context menu must be the child of a figure created with theuifigure
function. To display the context menu, it must have at least one menu item created with theuimenu
function.
Version History
Introduced before R2006a