Menu.clearItems

Syntax

clearItems(withDispose: Boolean);

Parameters

withDispose. Attribute of total deletion of items. If the parameter value is set to True, items will be removed totally, otherwise items will be simply removed from the menu.

Description

The clearItems method removes the menu child items.

Example

To execute the example, the HTML page must contain the Menu component named menu (see Example of Creating the Menu Component). Use the ClearItems method to remove all the child items of the menu:

menu.clearItems()

All the child items of the menu are removed after an example execution.

See also:

Menu