klyn.gui.windows.Menu.addMenu
method

    public addMenu(menu as Menu, icon as String = "") as MenuItem:

Description

Appends a submenu and returns its owning menu item.

Parameters

Parameter | Description
--- | ---
`menu` | Child menu.
`icon` | Optional icon displayed before the submenu title.

Returns

Item that opens `menu`, or `null` when `menu` is null.

Example

    refactor = Menu("&Refactor")
    refactor.addItem(MenuItem("&Rename..."))
    edit.addMenu(refactor, "refactor.svg")