Uicontextmenu
Create context menu component
描述
creates a context menu in the current figure and returns thecm
= uicontextmenuContextMenu
目的。If a figure does not exist, then MATLAB®打电话figure
函数创建一个。
To enable the context menu to open in the figure, you must also take these steps:
将上下文菜单分配给同一图中的UI组件或图形对象。
创建一个t least one child
菜单
上下文菜单中的对象。
例子
输入参数
提示
To display a context menu interactively in a running app, it must:
至少有一个菜单项。
Be assigned to a UI component or graphics object in the same figure.
要以编程方式打开上下文菜单,请使用
open
功能。上下文菜单必须是与uifigure
功能。To display the context menu, it must have at least one menu item created with theuimenu
功能。