getMenuItemById (value, notRecursive);
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.
The getMenuItemById method returns the child item of the menu by its identifier.
Item identifier is set using the Object.Id property.
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: