h = uimenu('PropertyName',PropertyValue,...)hsub = uimenu(h,'PropertyName',PropertyValue,...)
uimenu is a menu object creation function that accepts property name/property value pairs as input arguments. These properties are described under "Object Properties." You can also set and query property values after creating the object by using the set and get functions.
h = uimenu('PropertyName',PropertyValue,...) creates menus that can perform a predefined action. These menus display along the top of the figure on a menu bar. Each menu choice can itself be a menu that displays its submenu when selected. h is the handle of the created menu object.
hsub = uimenu(h,'PropertyName',PropertyValue,...) creates a submenu of the parent menu specified by the handle h. If you do not specify the handle of an existing menu, the current figure becomes the parent and the menu is a top-level menu.
AcceleratorAccelerator.Accelerator.BackGroundColorColorSpec reference page for more information on specifying color.ButtonDownFcneval function to execute the specified function. Initially the empty matrix.CallBackeval function to execute the Callback.Checkedon Check mark appears next to item, indicating it is selected.off (Default.) Check mark is not displayed.ChildrenClippingon (Default.) Any portion of the menu outside the axes rectangle is not displayed.off The menu is not clipped.Enableon (Default.) Menu item label appears dimmed, indicating you cannot select it.off Menu label does not appear dimmed.ForeGroundColorColorSpec reference page for more information on specifying color.Interruptibleyes The menu callbacks (ButtonDownFcn and Callback) are interruptible by other callbacks.no (Default.) The menu callbacks are not interruptible.LabelParentPositionPosition property, with 1 representing the left-most position. The individual items within a given menu are placed from top to bottom according to the value of their Position property, with 1 representing the top-most position.Separatoron A dividing line is drawn above the menu item.off (Default.) No dividing line is drawn.Type'uimenu' for a uimenu object.UserDataget command.Visibleon (Default.) uimenu is visible on the screen.off uimenu is not visible on the screen.
f = uimenu('Label','Workspace');uimenu(f,'Label','Save','Callback','save');uimenu(f,'Label','New Figure','Callback','figure');uimenu(f,'Label','Save','Callback','save');uimenu(f,'Label','Save','Callback','save');'Separator','on', 'Accelerator', 'Q');
uicontrol
(c) Copyright 1994 by The MathWorks, Inc.