MENU_ITEM
Adds an item to a parent POPUP_MENU or MENU_ITEM.
Attributes brief detailed show all inherited
Name | Description | |
---|---|---|
name | Name to be displayed in the menu item | |
action_id | Identifier of the target action to be executed when the menu item is selected | |
checked_param_id | Identifier of the parameter used to determine if the menu item should be checked |
Action and Param Usage
This is an example showing how to use menu items with actions and parameters.
- <!-- Define actions & parameter for the menu item -->
- <ACTION id="my_action" name="Show Alert" type="DisplayMessageBox" message="Alert!"/>
- <ACTION id="toggle_param" name="My param" type="Script" script="my_param = abs(1-my_param);" requires="my_param" />
- <PARAM id="my_param" type="boolean" default="1"/>
- <!-- The menu -->
- <POPUP_MENU id="menu">
- <MENU_ITEM action_id="my_action"/>
- <MENU_ITEM checked_param_id="my_param" action_id="toggle_param" />
- </POPUP_MENU>
- <!-- The button to show the menu -->
- <TEXT value="Click Me!" >
- <INVISIBLE_ACTION_BUTTON action_id="menu.Popup" width="100%" height="100%"/>
- </TEXT>

See POPUP_MENU element for more examples.