Parameter | Description |
---|---|
sId | Unique identifier of the menu item |
sCaption | Menu item caption |
Procedure OnItemClick String sId String sCaption
This event fires when a dynamically defined menu item is clicked.
Dynamic menu items can be defined in OnDefineMenu.
Object oWebMenuButton is a cWebMenuButton Set psCaption to "Menu" Set pbMenuShowCaption to False Procedure OnDefineMenu tWebMenuItem[] ByRef aMenu Move "1" to aMenu[0].sId Move "Item 1" to aMenu[0].sCaption Move True to aMenu[0].bEnabled Move "2" to aMenu[1].sId Move "Item 2" to aMenu[1].sCaption Move True to aMenu[1].bEnabled Move "2.1" to aMenu[1].aChildren[0].sId Move "Item 2.1" to aMenu[1].aChildren[0].sCaption Move True to aMenu[1].aChildren[0].bEnabled End_Procedure Procedure OnItemClick String sId String sCaption Send ShowInfoBox (SFormat("Dynamic menu item '%1' was clicked!", sCaption)) End_Procedure End_Object