Menu.getMenuItemById

Syntax

getMenuItemById (value, notRecursive);

Parameters

value. Identifier

notRecursive. Determine whether the search is performed for the child menu items only. If the False value is set the search is performed also for the submenu. If the True value is set the search for the item is performed among the child items of a menu only. By default the property is set to True.

Description

The getMenuItemById method returns the child item of the menu by its identifier.

Comments

Item identifier is set using the Object.Id property.

Example

To execute the example, the HTML page must contain the Menu component named menu1 (see description of the ImageList property), and one of the menu child items must have the identifier itemWithHotKey. The page displays the message with the hotkeys names set for the menu item with specified index with the help of the code given below.

alert (menu1.getMenuItemById("itemWithHotKey").getHotKey());

The "Ctrl+N" message is displayed on the page after an example execution.

See also:

Menu