12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

uimenuPurpose2uimenuCreate menus on figure windowsSyntaxDescriptionuimenu('PropertyName',PropertyValue,...)uimenu(parent,'PropertyName',PropertyValue,...)handle = uimenu('PropertyName',PropertyValue,...)handle = uimenu(parent,'PropertyName',PropertyValue,...)uimenu creates a hierarchy of menus and submenus that are displayed in thefigure window’s menu bar. You can also use uimenu to create menu items forcontext menus. More information about context menus.handle = uimenu('PropertyName',PropertyValue,...) creates a menu inthe current figure’s menu bar using the values of the specified properties andassigns the menu handle to handle.handle = uimenu(parent,'PropertyName',PropertyValue,...) creates asubmenu of a parent menu or a menu item on a context menu specified byparent and assigns the menu handle to handle. If parent refers to a figureinstead of another uimenu object or a Uicontextmenu, <strong>MATLAB</strong> creates a newmenu on the referenced figure’s menu bar.Remarks<strong>MATLAB</strong> adds the new menu to the existing menu bar. Each menu choice canitself be a menu that displays its submenu when selected.uimenu accepts property name/property value pairs, as well as structures andcell arrays of properties as input arguments. The uimenu Callback propertydefines the action taken when you activate the menu item. uimenu optionallyreturns the handle to the created uimenu object.Uimenus only appear in figures whose WindowStyle is normal. If a figurecontaining uimenu children is changed to WindowStyle modal, the uimenuchildren still exist and are contained in the Children list of the figure, but arenot displayed until the WindowStyle is changed to normal.The value of the figure MenuBar property affects the location of the uimenu onthe figure menu bar. When MenuBar is figure, a set of built-in menus precedesthe uimenus on the menu bar (<strong>MATLAB</strong> controls the built-in menus and theirhandles are not available to the user). When MenuBar is none, uimenus are theonly items on the menu bar (that is, the built-in menus do not appear).2-558

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!