User`s guide
11 Lay Out a Programmatic GUI
If you use the standard menu bar menus, any menus you create are added to
it. If you choose not to display the standard menu bar menus, the menu bar
contains only the m enus that you create. If you display no standard menus
and you create no menus, the menu bar itself does not display.
Note On Mac platforms, MATLAB creates menus on the menu bar at the
top of the screen, to the right o f the right-most existing menu, not at the
top of figure windows.
Use the figure MenuBar property to display or hide the MATLAB standard
menu bar shown in the preceding figure. Set
MenuBar to figur e (the default)
to display the standard m enus. Set
MenuBar to n one to hide them.
set(fh,'MenuBar','figure'); % Display standard menu bar menus.
set(fh,'MenuBar','none'); % Hide standa rd menu bar menus.
In these statements, fh is the handle of the figure.
Commonly Used Properties
The most commonly used properties needed to describe a menu bar menu are
shown in the following table.
Property Values Description
Accelerator
Alphabetic
character
Keyboard equivalent. Available
for menu items that do not have
submenus.
Checked
off
, on. Defa ult is
off.
Menu check indicator
Enable
on
, off. Default is
on.
Controls whether a menu item
can be selected. When set to
off, the menu label appears
dimmed.
11-76