The MenuItem object represents an item in a popup menu defined by a Menu. You can create a popup menu using the Dialog.CreateMenu method.
| Property Name | Return Type | Description |
|---|---|---|
bold |
bool |
True if the item should appear in bold. The convention is that this indicates the menu's default action (the item that will be chosen if you press the Enter key). |
checked |
bool |
True if the item is checked. |
data |
int |
User data value associated with the item. |
disabled |
bool |
True if the item appears disabled. |
id |
int |
The numeric ID of the item. This is used in a number of Menu methods and also to identify the command chosen by the user when the menu is displayed. |
label |
string |
The item's label. |
radio |
bool |
For toggle items, set this to True to make it a radio toggle. You can then assign the item to a group using the Menu.AddRadioGroup method to create sets of mutually-exclusive options. |
type |
string |
The item type. Types are "item", "toggle", "separator" and "submenu". |
submenu |
The sub-menu displayed by this item. |