Programmer's Guide > Interfaces > Window interface > createMenuItem method
  
createMenuItem method
Creates a menu item.
createMenuItem(label )
Parameters
Stringlabel
Specifies the label of the menu item. If this value is a dash ( -), the method returns a menu separator (a horizontal line) that distinguishes groups of items on a submenu. Specify an access key in the label by placing an ampersand (&) before the character to be used as the key. For example, to specify the F as the access key for "File", specify the label as &File. The character that follows the ampersand in a label is also known as the mnemonic of the menu item.
Returns
MenuItem. The newly created MenuItem.