Create menu or menu items
m = uimenu
m = uimenu(Name,Value)
m = uimenu(parent)
m = uimenu(parent,Name,Value)
specifies menu property values using one or more name-value pair arguments.m
= uimenu(Name,Value
)
specifies the parent container and one or more properties values.m
= uimenu(parent
,Name,Value
)
To make a menu item respond to user interaction, specify a callback for the
MenuSelectedFcn
property. The callback responds depending on
the location of the menu item and the type of interaction:
Left-clicking a menu expands that menu and triggers its callback.
While any menu is expanded, hovering any other parent menu (or top-level menu) expands that menu and triggers its callback.