Menu.removeItemByIndex

Syntax

removeItemByIndex (value);

Parameters

value. Index of the menu item to be removed.

Description

The removeItemByIndex method removes the menu item by index.

Example

To execute the example, the HTML page must contain the Menu component named menu1 (see the example for the Menu.ImageList property). Create the HTML button, by clicking which the first (top) menu item is removed together with the title and separator:

<button onclick = "removeFirst();">Remove first</button>

The following javascript code must be added to the separator:

    function removeFirst() {

        menu1.removeItemByIndex(0);

    }

The first menu item is removed by clicking the Remove First button after an example execution.

See also:

Menu