MATLAB Creating Graphical User Interfaces

(ff) #1

Create Menus for Programmatic Apps


In this section...
“Add Menu Bar Menus” on page 9-38
“Add Context Menus to a Programmatic App” on page 9-46

Add Menu Bar Menus


Use the uimenu function to add a menu bar menu to your UI. A syntax for uimenu is

mh = uimenu(parent,'PropertyName',PropertyValue,...)

Where mh is the handle of the resulting menu or menu item. See the uimenu reference
page for other valid syntaxes.

These topics discuss use of the MATLAB standard menu bar menus and describe
commonly used menu properties and offer some simple examples.


  • “Display Standard Menu Bar Menus” on page 9-38

  • “How Menus Affect Figure Docking” on page 9-39

  • “Menu Bar Menu” on page 9-41


Display Standard Menu Bar Menus

Displaying the standard menu bar menus is optional. This figure’s menu bar contains the
standard menus.

9 Lay Out a Programmatic UI

Free download pdf