Scilab Function
Last update : 19/4/2005

uimenu - Create a menu or a submenu in a figure

### Calling Sequence

  `h=uimenu([prop1,val1] [,prop2, val2] ...)`
  `h=uimenu(parent,[prop1, val1] [,prop2, val2] ...)`

### Parameters

- `parent` : integer Handle of menu's parent
- `prop{1, 2 ...}`: string character name of a property to set up
- `val{1, 2 ...}`: scilab object value to affect to the corresponding property
- `h`: integer handle of the corresponding menu

### Description

This allows to create menus in a figure. If `parent` is a figure, then the menu item will be added to the menu bar of the figure. If `parent` is a menu item , then the new item will be added to the parent item, allowing to create cascaded submenu.

### Properties

  - callbackstring: allows to set up the scilab instruction to call when the item is selected by the user.
  - labelstring: allows to set up the text appearing for the item.
  - tagstring: this property is generally used to identify the menu. It allows to give it a "name". Mainly used in conjontion with `findobj`.

### Examples

    f=figure('position', [10 10 300 200]);
    // create a figure
    m=uimenu(f,'label', 'windows');
    // create an item on the menu bar
    m1=uimenu(m,'label', 'operations');
    m2=uimenu(m,'label', 'quit scilab', 'callback', "exit");
    //create two items in the menu "windows"
    m11=uimenu(m1,'label', 'new window', 'callback',"xselect()");
    m12=uimenu(m1,'label', 'clear  window', 'callback',"xbasc()");
    // create a submenu to the item "operations"
    close(f);
    // close the figure

### See Also

`figure`, `uicontrol`, `set`, `get`,

### Author

Bertrand Guiheneuf