MATLAB Creating Graphical User Interfaces

(ff) #1

  • Specify the Callback function that executes when the users selects the menu item. If
    you have not yet saved the UI, the default value is %automatic. When you save the
    UI, and if you have not changed this field, GUIDE automatically sets the value using a
    combination of the Tag field and the UI file name. See “Menu Item” on page 7-22 for
    more information about specifying this field and for programming menu items.


The View button displays the callback, if there is one, in an editor. If you have not yet
saved the UI, GUIDE prompts you to save it.


  • Open the Property Inspector, where you can change all menu properties, by clicking
    the More Properties button. For detailed information about the properties, see
    Uimenu.


NoteSee “Menu Item” on page 7-22 and “How to Update a Menu Item Check” on page
7-24 for programming information and basic examples.

Additional Drop-Down Menus

To create additional drop-down menus, use the New Menu button in the same way you did
to create the File menu. For example, the following figure also shows an Edit drop-
down menu.

Cascading Menus

To create a cascading menu, select the menu item that will be the title for the cascading
menu, then click the New Menu Item button. In the example below, Edit is a cascading
menu.

6 Lay Out a UI Using GUIDE

Free download pdf