|
|
|
|
Functions
Events
MioScript Reference
|
|
Syntax
| menu.add.item(MenuID, ItemID, Title, isChecked, isDisabled, isGrayed, Style) |
Parameters
| ID | MenuID | ID of the menu.
| | ID | ItemID | ID of your choice to distinguish this menu item.
| | STRING | Title | Title of the menu item.
| | BOOL | isChecked | Optional. If true, the item is checked.
| | BOOL | isDisabled | Optional. If true, the item is disabled.
| | BOOL | isGrayed | Optional. If true, the item is grayed.
| | INT | Style | Optional. 0: Standard 1: Menu Break 2: Menu Bar Break (visual separator) |
Return value
No value is returned.
Description
Add an item to a menu.
The menu must be initialized with menu.create or {MENU_POPUP_CREATE}.
The event {link:MENU_CLICK} is raised when the user choose a menu item. |
MioScript Sample Code
&menuID = 0
menu.create(&menuID )
menu.add.item(&menuID, 0, "Item 1")
menu.add.item(&menuID, 0, "Item 2")
menu.set(main, &menuID) |
|
|
|