MATLAB Creating Graphical User Interfaces

(Barry) #1

6 Lay Out a UI Using GUIDE



  • Specify a string for the routine, i.e., the Callback, that performs the action
    associated with 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 8-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 Properties.


NoteSee “Menu Item” on page 8-22 and “How to Update a Menu Item Check” on
page 8-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, Copy is a cascading
menu.
Free download pdf